Local-first, open-source extraction pipeline for TradingView-like chart screenshots.
- Frame/axis localization, axis OCR (optional Paddle), calibration
- Elements detection, candle alignment, scenario reconstruction
- Final signal build (
direction,entry,stop,targets,confidence) - JSON output schema (Pydantic), YAML config, abstain plumbing
- Debug artifacts (
overlay.png,axis_debug.png,plot_crop.png,axis_crop.png,elements_debug.png)
python -m pip install -e .
pytest -q
c4 extract --helpc4 extract --image tests/assets/synth.png --out_json out.json --debug_dir debug --config configs/default.yamlUse the helper script to run one image or many images and write deterministic outputs:
python scripts/run_c4.py --image chart1.jpeg --debug-dir runs/_debug --out-dir runs/_out
python scripts/run_c4.py --dir runs --glob "*.jpeg" --debug-dir runs/_debug --out-dir runs/_outPer-image outputs:
runs/_out/<image_stem>/output.jsonruns/_debug/<image_stem>/...debug PNG artifacts
Run the formal suite over test-images with one command. Each execution creates a fresh timestamped folder:
python scripts/eval_c4_suite.pyOutputs are written under:
runs_eval/run_<YYYYMMDD_HHMMSS>/suite_summary.{md,json,csv}runs_eval/run_<...>/flagged/by_issue_code.{md,json}runs_eval/run_<...>/determinism/comparisons.{md,json}runs_eval/run_<...>/images/<stem>/artifactsandeval
Latest run pointer:
runs_eval/latest.txt
Custom run name:
python scripts/eval_c4_suite.py --run-name run_after_determinism_fixchart_frameaxis_tickselementsscenariosignalabstainabstain_reasonsdebug_artifacts