File size: 2,937 Bytes
72c6ac6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74177c3
 
 
 
 
 
 
21e673e
 
 
 
 
 
74177c3
 
 
 
729e125
 
42635f8
 
 
 
 
 
 
 
 
 
 
 
729e125
42635f8
729e125
 
 
 
 
 
 
 
 
 
42635f8
 
729e125
 
42635f8
729e125
 
42635f8
 
 
 
729e125
 
 
 
42635f8
729e125
 
 
 
 
 
 
 
 
 
 
 
 
 
42635f8
 
729e125
42635f8
729e125
42635f8
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
dataset_info:
  features:
  - name: image
    dtype: image
  - name: split
    dtype: string
  - name: bboxes
    list:
      list: float64
  - name: labels
    list: int64
  splits:
  - name: train
    num_bytes: 35419499
    num_examples: 150
  - name: val
    num_bytes: 9066986
    num_examples: 40
  - name: test
    num_bytes: 9666104
    num_examples: 40
  download_size: 54148967
  dataset_size: 54152589
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: val
    path: data/val-*
  - split: test
    path: data/test-*
task_categories:
- object-detection
tags:
- yolo
- finance
- trading
- charts
- object-detection
- chart-object-detection
- financial-chart
- financial-chart-analysis
- financial-charts
- financial-charts-analysis
license: apache-2.0
pretty_name: Chart Info YOLO
size_categories:
- n<1K
language:
- en
---

# Chart Info YOLO Dataset

This dataset contains annotated screenshots of financial charts (e.g. TradingView), formatted for object detection.  
It’s designed to train small YOLO models that detect UI elements used for downstream OCR:

- `0 = symbol_title` — the title block with the ticker and name at the top of the chart  
- `1 = last_price_pill` — the rounded price pill on the right-side price axis (current/last price)

## Structure

The dataset is provided in the classic YOLO structure:

```
images/
  train/*.png
  val/*.png
  test/*.png
labels/
  train/*.txt
  val/*.txt
  test/*.txt
data.yml
```

### Images
In the images directory you will find the chart images which is a sample from https://huggingface.co/datasets/StephanAkkerman/stock-charts.

### Labels
The labels directory provides the bounding boxes for the symbol title and last price pill for each chart.
```
<class_id> <x_center> <y_center> <width> <height>
```
All coordinates are normalized to [0, 1].
Some charts are unlabeled as I have only focused on TradingView charts for the labeling. 

### Example
The following image is an example of what a labeled chart looks like.

![training_data](https://cdn-uploads.huggingface.co/production/uploads/648728961eee18b6bd1836bb/AugrUbv3kvve2LP8WMqWj.png)

## Usage
Use the following example to download the dataset to use for YOLO model training.

```python
from huggingface_hub import snapshot_download

snapshot_download(
  repo_id="StephanAkkerman/chart-info-yolo",
  repo_type="dataset",
  local_dir="datasets/tradingview",
  local_dir_use_symlinks=False,
)
```

After this you need to refer to the data.yml path for the training and then it works.
```bash
yolo detect train model=yolo12n.pt data=datasets/tradingview/data.yaml imgsz=1792 epochs=80
```

## Intended use
This dataset is built to support:
- detecting chart UI elements (symbol_title, last_price_pill)
- cropping them for OCR (e.g. PaddleOCR) to extract ticker, name, and current price

Contributions (extra chart sources, more UI element classes) are welcome.