diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000066.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000066.JPEG deleted file mode 100755 index 89125c2245..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000066.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000092.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000092.JPEG deleted file mode 100755 index 5f8e19cc17..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000092.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000170.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000170.JPEG deleted file mode 100755 index 7da4f79f7c..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000170.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000237.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000237.JPEG deleted file mode 100755 index f928de4fe0..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000237.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000303.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000303.JPEG deleted file mode 100755 index a4f276b38d..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000303.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000336.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000336.JPEG deleted file mode 100755 index 78902279ae..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000336.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000597.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000597.JPEG deleted file mode 100755 index 6f2e2a7089..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000597.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000633.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000633.JPEG deleted file mode 100755 index cb3825dcd1..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000633.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000634.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000634.JPEG deleted file mode 100755 index 230e7ce39c..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000634.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000708.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000708.JPEG deleted file mode 100755 index eef8f36812..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000708.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000762.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000762.JPEG deleted file mode 100755 index 5a2eec64e8..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000762.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000888.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000888.JPEG deleted file mode 100755 index 07fb9f9e6a..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000888.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000917.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000917.JPEG deleted file mode 100755 index b22d7663c5..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000917.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000930.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000930.JPEG deleted file mode 100755 index 30849731aa..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00000930.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001007.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001007.JPEG deleted file mode 100755 index a0c62f23c2..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001007.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001092.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001092.JPEG deleted file mode 100755 index 095afa4d81..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001092.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001137.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001137.JPEG deleted file mode 100755 index eb9a0c5d9f..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001137.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001158.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001158.JPEG deleted file mode 100755 index 35329f651c..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001158.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001191.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001191.JPEG deleted file mode 100755 index ef24c12752..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001191.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001223.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001223.JPEG deleted file mode 100755 index e3f41f684f..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001223.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001397.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001397.JPEG deleted file mode 100755 index f295bb7961..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001397.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001663.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001663.JPEG deleted file mode 100755 index 87a2129edc..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001663.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001708.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001708.JPEG deleted file mode 100755 index 6fae3a7774..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001708.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001717.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001717.JPEG deleted file mode 100755 index d62af6cde4..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001717.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001858.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001858.JPEG deleted file mode 100755 index ecbffc21e2..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001858.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001873.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001873.JPEG deleted file mode 100755 index 16fcd0f844..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00001873.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002305.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002305.JPEG deleted file mode 100755 index f79954c5d9..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002305.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002367.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002367.JPEG deleted file mode 100755 index 487882e1c4..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002367.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002536.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002536.JPEG deleted file mode 100755 index eb61aa44b2..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002536.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002645.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002645.JPEG deleted file mode 100755 index 84be8ecf5c..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00002645.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004173.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004173.JPEG deleted file mode 100755 index 0984e4af37..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004173.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004278.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004278.JPEG deleted file mode 100755 index 31349ad19b..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004278.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004411.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004411.JPEG deleted file mode 100755 index 72ad2ad86b..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004411.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004562.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004562.JPEG deleted file mode 100755 index 912a12f0a3..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004562.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004572.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004572.JPEG deleted file mode 100755 index c048153240..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004572.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004578.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004578.JPEG deleted file mode 100755 index d8e8ab20fd..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004578.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004655.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004655.JPEG deleted file mode 100755 index 24b8e1e095..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004655.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004674.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004674.JPEG deleted file mode 100755 index 816b597e68..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004674.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004749.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004749.JPEG deleted file mode 100755 index f28f7999ae..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004749.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004750.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004750.JPEG deleted file mode 100755 index cda15eb91a..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004750.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004784.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004784.JPEG deleted file mode 100755 index ed557b0be3..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004784.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004813.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004813.JPEG deleted file mode 100755 index 4a9d6e64b7..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004813.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004880.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004880.JPEG deleted file mode 100755 index 2cab629705..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004880.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004939.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004939.JPEG deleted file mode 100755 index 5317c5200f..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00004939.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005117.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005117.JPEG deleted file mode 100755 index 755bb9b33a..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005117.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005178.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005178.JPEG deleted file mode 100755 index ed838a7094..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005178.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005220.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005220.JPEG deleted file mode 100755 index b728cdc59e..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005220.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005228.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005228.JPEG deleted file mode 100755 index cc06cc8dcd..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005228.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005369.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005369.JPEG deleted file mode 100755 index bda5bdb694..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005369.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005397.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005397.JPEG deleted file mode 100755 index 34fc62e33e..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005397.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005662.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005662.JPEG deleted file mode 100755 index 5b8e1a7538..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005662.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005746.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005746.JPEG deleted file mode 100755 index db6e3d4710..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005746.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005855.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005855.JPEG deleted file mode 100755 index 6326aef7b1..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005855.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005892.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005892.JPEG deleted file mode 100755 index 429d923644..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005892.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005998.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005998.JPEG deleted file mode 100755 index 20a2c3e347..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00005998.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006011.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006011.JPEG deleted file mode 100755 index 29e1987935..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006011.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006108.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006108.JPEG deleted file mode 100755 index 67ed09b501..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006108.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006148.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006148.JPEG deleted file mode 100755 index 65d9b64a20..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006148.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006178.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006178.JPEG deleted file mode 100755 index 13aab8fc39..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006178.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006182.JPEG b/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006182.JPEG deleted file mode 100755 index 482886f8ee..0000000000 Binary files a/onnxruntime/python/tools/quantization/E2E_example_model/calibration_data_set_test/ILSVRC2012_val_00006182.JPEG and /dev/null differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/e2e_user_example.py b/onnxruntime/python/tools/quantization/E2E_example_model/e2e_user_example.py index e30bf13685..1266edc161 100644 --- a/onnxruntime/python/tools/quantization/E2E_example_model/e2e_user_example.py +++ b/onnxruntime/python/tools/quantization/E2E_example_model/e2e_user_example.py @@ -65,13 +65,13 @@ def preprocess_func(images_folder, height, width, size_limit=0): def main(): model_path = './resnet50_v1.onnx' - calibration_dataset_path = './calibration_data_set_test' + calibration_dataset_path = './calibration_data_set' dr = ResNet50DataReader(calibration_dataset_path) #call calibrate to generate quantization dictionary containing the zero point and scale values quantization_params_dict = calibrate(model_path,dr) calibrated_quantized_model = quantize(onnx.load(model_path), quantization_mode=QuantizationMode.QLinearOps, - force_fusions=False, + force_fusions=True, quantization_params=quantization_params_dict) output_model_path = './calibrated_quantized_model.onnx' onnx.save(calibrated_quantized_model, output_model_path) diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/test_images/daisy.jpg b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/daisy.jpg new file mode 100755 index 0000000000..19c862cffd Binary files /dev/null and b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/daisy.jpg differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/test_images/rose.jpg b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/rose.jpg new file mode 100755 index 0000000000..5080a1c7ec Binary files /dev/null and b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/rose.jpg differ diff --git a/onnxruntime/python/tools/quantization/E2E_example_model/test_images/tulip.jpg b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/tulip.jpg new file mode 100755 index 0000000000..55297edc22 Binary files /dev/null and b/onnxruntime/python/tools/quantization/E2E_example_model/test_images/tulip.jpg differ diff --git a/onnxruntime/python/tools/quantization/calibrate.py b/onnxruntime/python/tools/quantization/calibrate.py index 93d96fe25c..fb01b45040 100644 --- a/onnxruntime/python/tools/quantization/calibrate.py +++ b/onnxruntime/python/tools/quantization/calibrate.py @@ -61,33 +61,47 @@ class ONNXCalibrater: :return: augmented ONNX model ''' + model = onnx.load(self.model_path) + model = onnx.shape_inference.infer_shapes(model) + value_infos = {vi.name: vi for vi in model.graph.value_info} + added_nodes = [] added_outputs = [] - model = onnx.load(self.model_path) + tensors_to_calibrate = set() + for node in model.graph.node: should_be_calibrate = ((node.op_type in self.calibrate_op_types) and (node.name not in self.black_nodes)) or (node.name in self.white_nodes) if should_be_calibrate: - input_name = node.output[0] - # Adding ReduceMin nodes - reduce_min_name = '' - if node.name != '': - reduce_min_name = node.name + '_ReduceMin' - reduce_min_node = onnx.helper.make_node('ReduceMin', [input_name], [input_name + '_ReduceMin'], - reduce_min_name, - keepdims=0) - added_nodes.append(reduce_min_node) - added_outputs.append(helper.make_tensor_value_info(reduce_min_node.output[0], TensorProto.FLOAT, ())) + for input_tensor_name in node.input: + if input_tensor_name in value_infos.keys(): + vi = value_infos[input_tensor_name] + if vi.type.HasField( + 'tensor_type') and vi.type.tensor_type.elem_type == onnx_proto.TensorProto.FLOAT and ( + input_tensor_name not in model.graph.initializer): + tensors_to_calibrate.add(input_tensor_name) - # Adding ReduceMax nodes - reduce_max_name = '' - if node.name != '': - reduce_max_name = node.name + '_ReduceMax' - reduce_max_node = onnx.helper.make_node('ReduceMax', [input_name], [input_name + '_ReduceMax'], - reduce_max_name, - keepdims=0) - added_nodes.append(reduce_max_node) - added_outputs.append(helper.make_tensor_value_info(reduce_max_node.output[0], TensorProto.FLOAT, ())) + for output_tensor_name in node.output: + if output_tensor_name in value_infos.keys(): + vi = value_infos[output_tensor_name] + if vi.type.HasField( + 'tensor_type') and vi.type.tensor_type.elem_type == onnx_proto.TensorProto.FLOAT: + tensors_to_calibrate.add(output_tensor_name) + + for tensor in tensors_to_calibrate: + # Adding ReduceMin nodes + reduce_min_name = tensor + '_ReduceMin' + reduce_min_node = onnx.helper.make_node('ReduceMin', [tensor], [tensor + '_ReduceMin'], reduce_min_name, keepdims=0) + + added_nodes.append(reduce_min_node) + added_outputs.append(helper.make_tensor_value_info(reduce_min_node.output[0], TensorProto.FLOAT, ())) + + # Adding ReduceMax nodes + reduce_max_name = tensor + '_ReduceMax' + reduce_max_node = onnx.helper.make_node('ReduceMax', [tensor], [tensor + '_ReduceMax'], reduce_max_name, keepdims=0) + + added_nodes.append(reduce_max_node) + added_outputs.append(helper.make_tensor_value_info(reduce_max_node.output[0], TensorProto.FLOAT, ())) model.graph.node.extend(added_nodes) model.graph.output.extend(added_outputs) @@ -209,9 +223,9 @@ class ONNXCalibrater: def calibrate(model_path, data_reader:CalibrationDataReader, - op_types='Conv,MatMul', - black_nodes='', - white_nodes='', + op_types=['Conv','MatMul'], + black_nodes=[], + white_nodes=[], augmented_model_path ='augmented_model.onnx'): ''' Given an onnx model, augment and run the augmented model on calibration data set, aggregate and calculate the quantization parameters.