|
| 1 | +<div align="center"> |
| 2 | + |
1 | 3 | # Chart2CSV |
2 | 4 |
|
| 5 | +### Zero-Click AI Chart Data Extraction |
| 6 | + |
3 | 7 | **Extract data from chart images to CSV. No clicking required.** |
4 | 8 |
|
5 | | -[](https://kiku-jw.github.io/Chart2CSV/) |
6 | | -[](https://python.org) |
7 | | -[](LICENSE) |
| 9 | +[Live Demo](https://kiku-jw.github.io/Chart2CSV/) · [Documentation](https://github.com/kiku-jw/Chart2CSV/wiki) · [Report Bug](https://github.com/kiku-jw/Chart2CSV/issues) |
| 10 | + |
| 11 | +[](https://kiku-jw.github.io/Chart2CSV/) |
| 12 | +[](LICENSE) |
| 13 | +[](https://python.org) |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +</div> |
8 | 18 |
|
9 | | -## What is Chart2CSV? |
| 19 | +## ⚡ The Problem |
10 | 20 |
|
11 | | -Chart2CSV is a tool that reads chart images and extracts the data as CSV. |
| 21 | +You have a chart image from a research paper, report, or website. You need the actual numbers. |
12 | 22 |
|
13 | | -**Input:** A picture of a chart (PNG, JPG) |
14 | | -**Output:** CSV file with x,y coordinates |
| 23 | +**Traditional tools** make you click each data point manually. That takes 5-30 minutes per chart. |
15 | 24 |
|
16 | | -Works with line charts, scatter plots, and bar charts. |
| 25 | +**Chart2CSV** uses AI to read the chart automatically. Drop image → Get CSV. Done in seconds. |
17 | 26 |
|
18 | | -## Quick Start |
| 27 | +--- |
| 28 | + |
| 29 | +## 🚀 Quick Start |
19 | 30 |
|
20 | 31 | ```bash |
21 | | -# Install |
22 | 32 | pip install chart2csv |
| 33 | +``` |
23 | 34 |
|
24 | | -# Extract data from a chart |
25 | | -python -m chart2csv.cli.main chart.png |
26 | | - |
27 | | -# Output: chart.csv with the extracted data |
| 35 | +```bash |
| 36 | +python -m chart2csv.cli.main your_chart.png |
28 | 37 | ``` |
29 | 38 |
|
30 | | -## Live Demo |
| 39 | +That's it. Check `your_chart.csv` for the extracted data. |
31 | 40 |
|
32 | | -**[Try it in your browser →](https://kiku-jw.github.io/Chart2CSV/)** |
| 41 | +--- |
33 | 42 |
|
34 | | -No installation needed. Uses AI to read your chart. |
| 43 | +## 🌐 Try Online |
35 | 44 |
|
36 | | -## Why Chart2CSV? |
| 45 | +**[Open Live Demo →](https://kiku-jw.github.io/Chart2CSV/)** |
37 | 46 |
|
38 | | -| Tool | How it works | Speed | |
39 | | -|------|--------------|-------| |
40 | | -| WebPlotDigitizer | Click each point manually | Slow | |
41 | | -| PlotDigitizer Pro | Semi-automatic, paid | Medium | |
42 | | -| **Chart2CSV** | AI reads automatically | **Fast** | |
| 47 | +No installation needed. Works in your browser. |
43 | 48 |
|
44 | | -## Features |
| 49 | +--- |
45 | 50 |
|
46 | | -- **Zero-click extraction** — AI understands your chart |
47 | | -- **Works offline** — Uses local OCR by default |
48 | | -- **Mistral AI option** — Better accuracy with `--use-mistral` |
49 | | -- **Batch processing** — Process folders of charts |
50 | | -- **Visual verification** — See what was detected with `--overlay` |
| 51 | +## ✨ Features |
51 | 52 |
|
52 | | -## Usage Examples |
| 53 | +| | Feature | Description | |
| 54 | +|---|---|---| |
| 55 | +| ⚡ | **Zero-Click** | AI understands your chart automatically | |
| 56 | +| 🧠 | **Smart OCR** | Mistral Vision reads axis labels accurately | |
| 57 | +| 🔒 | **Privacy** | Runs offline by default with Tesseract | |
| 58 | +| 📊 | **Multi-Chart** | Line, scatter, bar charts supported | |
| 59 | +| ⚙️ | **CLI** | Batch process folders of charts | |
| 60 | +| ✓ | **Overlay** | Visual verification of detected points | |
53 | 61 |
|
54 | | -```bash |
55 | | -# Basic extraction |
56 | | -python -m chart2csv.cli.main chart.png |
| 62 | +--- |
57 | 63 |
|
58 | | -# Use AI for better accuracy |
59 | | -python -m chart2csv.cli.main chart.png --use-mistral |
| 64 | +## 📊 Comparison |
60 | 65 |
|
61 | | -# Process multiple charts |
62 | | -python -m chart2csv.cli.main folder/ --batch --output-dir results/ |
| 66 | +| | WebPlotDigitizer | PlotDigitizer Pro | **Chart2CSV** | |
| 67 | +|---|---|---|---| |
| 68 | +| **Method** | Manual clicking | Semi-auto | AI automatic | |
| 69 | +| **Speed** | 5-30 min | 2-10 min | **Seconds** | |
| 70 | +| **Price** | Free | Paid | **Free** | |
| 71 | +| **Offline** | ✓ | ✗ | ✓ | |
| 72 | +| **CLI/API** | ✗ | ✗ | ✓ | |
| 73 | +| **AI OCR** | ✗ | ✗ | ✓ | |
63 | 74 |
|
64 | | -# Verify with overlay |
65 | | -python -m chart2csv.cli.main chart.png --overlay check.png |
66 | | -``` |
| 75 | +--- |
67 | 76 |
|
68 | | -## Supported Charts |
| 77 | +## 💻 Usage |
| 78 | + |
| 79 | +### Basic |
| 80 | +```bash |
| 81 | +python -m chart2csv.cli.main chart.png |
| 82 | +``` |
69 | 83 |
|
70 | | -- ✅ Line charts |
71 | | -- ✅ Scatter plots |
72 | | -- ✅ Bar charts |
73 | | -- ✅ Linear and log scales |
| 84 | +### With AI (better accuracy) |
| 85 | +```bash |
| 86 | +export MISTRAL_API_KEY=your_key |
| 87 | +python -m chart2csv.cli.main chart.png --use-mistral |
| 88 | +``` |
74 | 89 |
|
75 | | -## Installation |
| 90 | +### Batch processing |
| 91 | +```bash |
| 92 | +python -m chart2csv.cli.main charts/ --batch --output-dir results/ |
| 93 | +``` |
76 | 94 |
|
| 95 | +### Visual verification |
77 | 96 | ```bash |
78 | | -pip install chart2csv |
| 97 | +python -m chart2csv.cli.main chart.png --overlay check.png |
79 | 98 | ``` |
80 | 99 |
|
81 | | -For offline OCR, also install Tesseract: |
82 | | -- macOS: `brew install tesseract` |
83 | | -- Ubuntu: `apt-get install tesseract-ocr` |
84 | | -- Windows: [Download installer](https://github.com/UB-Mannheim/tesseract/wiki) |
| 100 | +--- |
85 | 101 |
|
86 | | -## Documentation |
| 102 | +## 📖 Documentation |
87 | 103 |
|
| 104 | +- [Installation](https://github.com/kiku-jw/Chart2CSV/wiki/Installation) |
88 | 105 | - [Quick Start](https://github.com/kiku-jw/Chart2CSV/wiki/Quick-Start) |
89 | 106 | - [CLI Reference](https://github.com/kiku-jw/Chart2CSV/wiki/CLI-Reference) |
| 107 | +- [How It Works](https://github.com/kiku-jw/Chart2CSV/wiki/How-It-Works) |
90 | 108 | - [FAQ](https://github.com/kiku-jw/Chart2CSV/wiki/FAQ) |
91 | | -- [Troubleshooting](https://github.com/kiku-jw/Chart2CSV/wiki/Troubleshooting) |
92 | 109 |
|
93 | | -## How It Works |
| 110 | +--- |
| 111 | + |
| 112 | +## 🛠️ Installation |
94 | 113 |
|
95 | | -1. Detects the chart area |
96 | | -2. Finds the X and Y axes |
97 | | -3. Reads the axis labels with OCR |
98 | | -4. Extracts data points |
99 | | -5. Outputs CSV |
| 114 | +```bash |
| 115 | +pip install chart2csv |
| 116 | +``` |
100 | 117 |
|
101 | | -## Contributing |
| 118 | +For offline OCR: |
| 119 | +```bash |
| 120 | +# macOS |
| 121 | +brew install tesseract |
102 | 122 |
|
103 | | -Issues and pull requests welcome. See [GitHub Issues](https://github.com/kiku-jw/Chart2CSV/issues). |
| 123 | +# Ubuntu |
| 124 | +apt-get install tesseract-ocr |
| 125 | +``` |
104 | 126 |
|
105 | | -## License |
| 127 | +--- |
| 128 | + |
| 129 | +## 📄 License |
106 | 130 |
|
107 | 131 | MIT License. Free for personal and commercial use. |
108 | 132 |
|
109 | 133 | --- |
110 | 134 |
|
111 | | -**Keywords:** chart digitizer, extract data from graph, plot to csv, graph data extraction, chart image to data, webplotdigitizer alternative, digitize chart, extract values from chart image, chart ocr, graph to excel |
| 135 | +<div align="center"> |
| 136 | + |
| 137 | +**[⬆ Back to Top](#chart2csv)** |
| 138 | + |
| 139 | +Made with ❤️ by [kiku-jw](https://github.com/kiku-jw) |
| 140 | + |
| 141 | +</div> |
0 commit comments