All Projects → bloomberg → Scatteract

bloomberg / Scatteract

Project which implements extraction of data from scatter plots

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Scatteract

Amass
Data preparation and loader for AMASS
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Juliabox
Juliabox continues to run, but this codebase is no longer current.
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Pytorch Vae
A CNN Variational Autoencoder (CNN-VAE) implemented in PyTorch
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Yolov3 Tf2
YoloV3 Implemented in Tensorflow 2.0
Stars: ✭ 2,327 (+1185.64%)
Mutual labels:  jupyter-notebook
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Face and emotion detection
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Oct2py
Run M Files from Python - GNU Octave to Python bridge
Stars: ✭ 179 (-1.1%)
Mutual labels:  jupyter-notebook
Machinelearning ng
吴恩达机器学习coursera课程,学习代码(2017年秋) The Stanford Coursera course on MachineLearning with Andrew Ng
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Keras Segnet
SegNet model implemented using keras framework
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Libfm in keras
This notebook shows how to implement LibFM in Keras and how it was used in the Talking Data competition on Kaggle.
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Anime Gan Tensorflow
The BIGGAN based Anime generation implemented with tensorflow. All training data has been open sourced.
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Pulmonary Nodules Maskrcnn
Mask R-CNN for Pulmonary Nodules Diagnosis, using TensorFlow 天池医疗AI大赛:Mask R-CNN肺部结节智能检测(Segmentation + Classification)
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Lets Plot Kotlin
Kotlin API for Lets-Plot - an open-source plotting library for statistical data.
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Andrew Ng Notes
This is Andrew NG Coursera Handwritten Notes.
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Eeg Notebooks v0.1
Previous version of eeg-notebooks
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Deeplearning.ai
该存储库包含由deeplearning.ai提供的相关课程的个人的笔记和实现代码。
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Nlp profiler
A simple NLP library allows profiling datasets with one or more text columns. When given a dataset and a column name containing text data, NLP Profiler will return either high-level insights or low-level/granular statistical information about the text in that column.
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Deeplearning.ai Note
网易云课堂终于官方发布了吴恩达经过授权的汉化课程-“”深度学习专项课程“”,这是自己做的一些笔记以及代码。下为网易云学习链接
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook
Deeptoxic
top 1% solution to toxic comment classification challenge on Kaggle.
Stars: ✭ 180 (-0.55%)
Mutual labels:  jupyter-notebook
Wibd Workshops 2018
Stars: ✭ 181 (+0%)
Mutual labels:  jupyter-notebook

Scatteract

Scatteract

Scatteract is a framework to automatically extract data from the image of scatter plots. We use TensorBox1 to detect the relevant objects (points, tick marks and tick values), Tesseract for the OCR, and several heuristics to extract the points in chart coordinates. See the paper for details. This repository is meant to support the paper and is not an attempt at creating an actual open source project.

1Disclaimer: We vendored the TensorBox dependency into the tensorbox folder since there is no way to pull it in from pypi. We have made no change to this code.

Requirements:

tensorflow==0.10.0rc0
scipy (tested on 0.17.1)
scikit-learn (tested on 0.17.1)
pandas (tested on 0.18.1)
Pillow (PIL) (tested on 3.2.0)
numpy (tested on 1.10.4)
opencv-python (cv2) (tested on 2.4.10)
matplotlib (tested on 1.5.1)
runcython (tested on 0.25)
pyocr (tested on 0.4.6)
tesseract-ocr (tested on 3.02)

On Python 2.7+, the following compatibility module is also required:

backports.functools_lru_cache

How to use:

Generate training and testing data

$ python generate_random_scatter.py --directory plots_v1 --n_train 25000 --n_test 500 

Train object detection models

Note that we are using an older version of TensorBox which crashes once training is done because of threading issues, nevertheless the trained models are successfully saved.

& cd tensorbox/utils/ && make && cd ../..
$ python tensorbox/train_obj_model.py --hypes hypes/lstm_rezoom_plot_points.json --gpu 0 --logdir output  --name points_v1
$ python tensorbox/train_obj_model.py --hypes hypes/lstm_rezoom_plot_ticks.json --gpu 0 --logdir output  --name ticks_v1
$ python tensorbox/train_obj_model.py --hypes hypes/lstm_rezoom_plot_labels.json --gpu 0 --logdir output  --name labels_v1

IPython Notebook

The ipython notebook can be used after the object detection models are trained. It allows you to interact with the building blocks of Scatteract and visualize their outputs.

Test object detection models

On the randomly generated test set:
$ chmod +x tensorbox -R
$ python test_obj_model.py --model_dir output/points_v1 --iteration 125000 --image_dir data/plots_v1 --true_idl data/plots_v1/test_points.idl 
$ python test_obj_model.py --model_dir output/ticks_v1 --iteration 125000 --image_dir data/plots_v1 --true_idl data/plots_v1/test_ticks.idl 
$ python test_obj_model.py --model_dir output/labels_v1 --iteration 125000 --image_dir data/plots_v1 --true_idl data/plots_v1/test_labels.idl 

On a currated randomly generated test set:
$ chmod +x tensorbox -R
$ python test_obj_model.py --model_dir output/points_v1 --iteration 125000 --image_dir data/plot_test --true_idl data/plot_test/points.idl
$ python test_obj_model.py --model_dir output/ticks_v1 --iteration 125000 --image_dir data/plot_test --true_idl data/plot_test/ticks.idl
$ python test_obj_model.py --model_dir output/labels_v1 --iteration 125000 --image_dir data/plot_test --true_idl data/plot_test/labels.idl 

Test OCR

On the randomly generated test set:
$ python generate_test_tesseract.py --image_dir data/plots_v1 --label_values_idl  data/plots_v1/test_label_values.idl 
$ python tesseract.py --tsv_truth data/plots_v1/label_image_values.tsv --image_dir data/plots_v1/label_images

On a currated randomly generated test set:
$ python tesseract.py --tsv_truth data/plot_test/label_image_values.tsv --image_dir data/plot_test/label_images

Test end-to-end system

On a currated randomly generated test set:
& python scatter_extract.py --model_dict '{"ticks":"./output/ticks_v1", "labels":"./output/labels_v1","points":"./output/points_v1"}' \
--true_idl_dict '{"ticks":"./data/plot_test/ticks.idl","labels":"./data/plot_test/labels.idl", "points":"./data/plot_test/points.idl"}' \
--image_output_dir image_output --csv_output_dir csv_output --true_coord_idl ./data/plot_test/coords.idl \
--iteration 125000 --image_dir data/plot_test/ 

Predict with end-to-end system (i.e. extract data points from plots with no ground truth)

On a set of plots scrapped from the web:
$ python scatter_extract.py --model_dict '{"ticks":"./output/ticks_v1", "labels":"./output/labels_v1","points":"./output/points_v1"}' \
--iteration 125000 --image_dir data/plot_real/ --predict_idl ./data/plot_real/test_real.idl --image_output_dir image_output --csv_output_dir csv_output
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].