|
--- |
|
tags: |
|
- image-classification |
|
- timm |
|
- chart |
|
- charts |
|
- fintwit |
|
- stocks |
|
- crypto |
|
library_name: timm |
|
license: mit |
|
datasets: |
|
- StephanAkkerman/crypto-charts |
|
- StephanAkkerman/stock-charts |
|
- StephanAkkerman/fintwit-images |
|
language: |
|
- en |
|
metrics: |
|
- accuracy |
|
- f1 |
|
- precision |
|
- recall |
|
pipeline_tag: image-classification |
|
base_model: timm/efficientnet_b0.ra_in1k |
|
--- |
|
# Chart Recognizer |
|
|
|
chart-recognizer is a finetuned model for classifying images. It uses efficientnet as its base model, making it a fast and small model. |
|
This model is trained on my own dataset of financial charts posted on Twitter, which can be found here [StephanAkkerman/fintwit-charts](https://huggingface.co/datasets/StephanAkkerman/fintwit-charts). |
|
|
|
## Intended Uses |
|
|
|
chart-recognizer is intended for classifying images, mainly images posted on social media. |
|
|
|
## Dataset |
|
|
|
chart-recognizer has been trained on my own dataset. So far I have not been able to find another image dataset about financial charts. |
|
- [StephanAkkerman/crypto-charts](https://huggingface.co/datasets/StephanAkkerman/crypto-charts): 4,880 images. |
|
- [StephanAkkerman/stock-charts](https://huggingface.co/datasets/StephanAkkerman/stock-charts): 5,203 images. |
|
- [StephanAkkerman/fintwit-images](https://huggingface.co/datasets/StephanAkkerman/fintwit-images): 4,579 images. |
|
|
|
## More Information |
|
|
|
For a comprehensive overview, including the training setup and analysis of the model, visit the [chart-recognizer GitHub repository](https://github.com/StephanAkkerman/chart-recognizer). |
|
|
|
## Usage |
|
|
|
Using [HuggingFace's transformers library](https://huggingface.co/docs/transformers/index) the model can be converted into a pipeline for image classification. |
|
|
|
```python |
|
from transformers import pipeline |
|
|
|
# Create a sentiment analysis pipeline |
|
pipe = pipeline( |
|
"image-classification", |
|
model="StephanAkkerman/chart-recognizer", |
|
) |
|
|
|
# Get the predicted sentiment |
|
print(pipe(image)) |
|
``` |
|
|
|
## Citing & Authors |
|
|
|
If you use chart-recognizer in your research, please cite me as follows: |
|
|
|
``` |
|
@misc{chart-recognizer, |
|
author = {Stephan Akkerman}, |
|
title = {chart-recognizer: A Specialized Image Model for Financial Charts}, |
|
year = {2024}, |
|
publisher = {GitHub}, |
|
journal = {GitHub repository}, |
|
howpublished = {\url{https://github.com/StephanAkkerman/chart-recognizer}} |
|
} |
|
``` |
|
|
|
## License |
|
|
|
This project is licensed under the MIT License. See the [LICENSE](https://choosealicense.com/licenses/mit/) file for details. |