Transformers
jespark commited on
Commit
3c82812
·
verified ·
1 Parent(s): aa733ad

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md CHANGED
@@ -4,3 +4,14 @@ tags: []
4
  ---
5
 
6
  This is a data processor for the Community Forensics classifiers. Detailed instructions will be updated at the [Community Forensics GitHub_repo](https://github.com/JeongsooP/Community-Forensics) in the future.
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  This is a data processor for the Community Forensics classifiers. Detailed instructions will be updated at the [Community Forensics GitHub_repo](https://github.com/JeongsooP/Community-Forensics) in the future.
7
+
8
+ ### Simple usage example.
9
+ `dataprocessor_hf.py` is included in this repository.
10
+ ```python
11
+ import dataprocessor_hf as dphf
12
+ from PIL import Image
13
+ data_processor = dphf.CommForImageProcessor.from_pretrained('OwensLab/commfor-data-preprocessor', size=384)
14
+ img = Image.open('path_to_img.png')
15
+ processed_image = data_processor(img, mode='test')
16
+
17
+ ```