Instructions to use OwensLab/commfor-data-preprocessor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OwensLab/commfor-data-preprocessor with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OwensLab/commfor-data-preprocessor", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| license: mit | |
| datasets: | |
| - OwensLab/CommunityForensics | |
| - OwensLab/CommunityForensics-Small | |
| 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. | |
| - Code: [GitHub Repository](https://github.com/JeongsooP/Community-Forensics) | |
| - Paper: [arXiv](https://arxiv.org/abs/2411.04125) | |
| ### Simple usage example. | |
| `dataprocessor_hf.py` is included in this repository. | |
| ```python | |
| import dataprocessor_hf as dphf | |
| from PIL import Image | |
| data_processor = dphf.CommForImageProcessor.from_pretrained('OwensLab/commfor-data-preprocessor', size=384) | |
| img = Image.open('path_to_img.png') | |
| processed_image = data_processor(img, mode='test') | |
| ``` |