TL;DR: using syntactic pytorch data loader abstraction to feed your TF model.
WIP. The code should work. Take a look at the benchmark for a particular use case.
- CSV file loader. using "image,target" as header.
- simple transformer
- loop over the entire dataset
- make a graph
- call session
Gimme a star, cite my research, invite me a beer/coffee 😉
You can see a comparison using SSD with InceptionV2 as base network below. In conclusion, 158x speed up with 8 workers.
Pytorchify feeder
2017-10-04 12:07:50,453 INFO batch_detection_naive.py: Warm-up period is over
2017-10-04 12:07:58,740 INFO batch_detection_naive.py: [125/538025] Batch 0.073 (0.071) Data-in 0.001 (0.001)
2017-10-04 12:08:07,611 INFO batch_detection_naive.py: [250/538025] Batch 0.062 (0.071) Data-in 0.001 (0.001)
2017-10-04 12:08:16,604 INFO batch_detection_naive.py: [375/538025] Batch 0.068 (0.071) Data-in 0.001 (0.001)
2017-10-04 12:08:25,568 INFO batch_detection_naive.py: [500/538025] Batch 0.071 (0.071) Data-in 0.001 (0.001)
2017-10-04 12:08:25,568 DEBUG batch_detection_naive.py: Stopping...
2017-10-04 12:08:25,585 INFO batch_detection_naive.py: Batch 0.071 Data-in 0.001
single thread for loop in python
2017-10-04 12:13:27,589 INFO batch_detection_naive.py: Warm-up period is over
2017-10-04 12:13:55,106 INFO batch_detection_naive.py: [125/538025] Batch 0.067 (0.067) Data-in 0.139 (0.174)
2017-10-04 12:14:22,875 INFO batch_detection_naive.py: [250/538025] Batch 0.091 (0.071) Data-in 0.157 (0.160)
2017-10-04 12:14:51,455 INFO batch_detection_naive.py: [375/538025] Batch 0.069 (0.072) Data-in 0.155 (0.158)
2017-10-04 12:15:20,456 INFO batch_detection_naive.py: [500/538025] Batch 0.073 (0.072) Data-in 0.160 (0.158)
2017-10-04 12:15:20,456 DEBUG batch_detection_naive.py: Stopping...
2017-10-04 12:15:20,471 INFO batch_detection_naive.py: Batch 0.072 Data-in 0.158