-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize counting train & inference speed and memory consumption #2172
Optimize counting train & inference speed and memory consumption #2172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your effort! I left some comments
otx/algorithms/detection/configs/instance_segmentation/configuration.yaml
Outdated
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the gathering effort. A few comments of mine:
otx/algorithms/detection/configs/instance_segmentation/efficientnetb2b_maskrcnn/deployment.py
Outdated
Show resolved
Hide resolved
otx/algorithms/detection/configs/instance_segmentation/resnet50_maskrcnn/deployment.py
Outdated
Show resolved
Hide resolved
...algorithms/detection/configs/instance_segmentation/efficientnetb2b_maskrcnn/tile_pipeline.py
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
otx/api/usecases/exportable_code/prediction_to_annotation_converter.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments, and we need to add some unit tests for each optimization method
otx/algorithms/detection/configs/instance_segmentation/configuration.yaml
Show resolved
Hide resolved
otx/algorithms/detection/configs/instance_segmentation/configuration.yaml
Outdated
Show resolved
Hide resolved
…ence threshold filter for openvino eval
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's merge after test. Refinement could be followed in next PRs.
ea106e9
to
8433197
Compare
* Add sampling tiling dataset method * Add unit test * update * update * update configs * update * Update * Fix configuration for deployment * Add experimental script * Fix smallthing in exp.sh * Change default labels type from list to np.array * Revert resolution, num_workers * Fix typo * Skip mask if its confidence is under threshold * Add prediction with user defined confidence threshold * Update exp.sh * support multi-batch in tile classifier * polygon sampling * exclude full image in training * Add * Refine adaptive tile params - Use size rather than area - 32 pixels as min detectable size - Default object_tile_ratio = 32 / 1024 = 0.03 * Tune params * Fix tile on the edge * Fix IR overlap ratio according to IR scale factor Signed-off-by: Songki Choi <songki.choi@intel.com> * Set default object_tile_ratio = 0.06 (32/512) * Add tile_deployment * Keep aspect ratio for tiling * Fix tile patching * Fix adaptive tile logic for robustness * Delete useless file * Cleansing * Update exp.sh * Fix precommit * Refine adaptive tile params - Use size rather than area - 32 pixels as min detectable size - Default object_tile_ratio = 32 / 1024 = 0.03 * Tune params * Set default object_tile_ratio = 0.06 (32/512) * Keep aspect ratio for tiling * Fix tile patching * Fix adaptive tile logic for robustness * Remove useless line * Apply comments * Remove some comments * make black happy * Update default value of object tile ratio * Fix polygon append * Fix polygon append * Fix merge error, revert temp tox change * Fix precommit, remove exp.sh * Remove 20 points sampling * Fix mypy issue * Modify way to change subset type of _infer_model dataset & Add confidence threshold filter for openvino eval * Remove breakpoint * Update config param description, expose ellipse option * Fix unit test * Fix deploy patch bug (w,h) -> (h,w) * Fix iseg intg test * Revert tiling-ins-seg intg test * Fix for det tiling intg test --------- Signed-off-by: Songki Choi <songki.choi@intel.com> Co-authored-by: jaegukhyun <jaeguk.hyun@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: sungmanc <sungmanc@intel.com> Co-authored-by: Songki Choi <songki.choi@intel.com>
* Optimize counting train & inference speed and memory consumption (#2172) * Do not skip full img tile classifier + Fix Sequencial Export Issue (#2174) * Add warning message to tiling parameter (#2193) * Change the way to pad for instance-segmentation * Hotfix: use 0 confidence threshold when computing best threshold based on F1 * Fix possible bw issue in exportable code (#2212) * Fix ellipse load (#2214) --------- Signed-off-by: Songki Choi <songki.choi@intel.com> Co-authored-by: Sungman Cho <sungman.cho@intel.com> Co-authored-by: jaegukhyun <jaeguk.hyun@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: sungmanc <sungmanc@intel.com> Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com>
* Fix e2e (#2179) * Fix iseg e2e (#2173) * Fix det e2e (#2176) * Update noisy label det docs for detection task (#2183) * Fix iseg e2e (#2173) * Fix det e2e (#2176) * Add supcon seg for regression (#2177) * Fix iseg e2e (#2173) * Fix det e2e (#2176) * Update regression test config (#2186) * Fix for anomaly regression test (#2188) * Fix iseg regression (#2190) * Set path to save pseudo masks into workspace (#2185) * Temporary fix override_configs bug (#2187) * Fix iseg e2e (#2173) * Fix det e2e (#2176) * Cleaned up skip/xfail TCs on the classification e2e tests (#2196) * Added csv output to export dependencies (#2178) * Fix typo and enlarge the threshold for KPI tests (#2198) * bugfix: auto adapt batch size doesn't work with cls incr case (#2199) * Fix for ssd (#2197) * Turn off persistent worker if num_worker is zero in classification task (#2208) * Update test cases of common_semantic_segmentation_dataset (#2210) * Optimize counting train & inference speed and memory consumption (#2172) * Do not skip full img tile classifier + Fix Sequencial Export Issue (#2174) * Add warning message to tiling parameter (#2193) * Change the way to pad for instance-segmentation * Hotfix: use 0 confidence threshold when computing best threshold based on F1 * Fix possible bw issue in exportable code (#2212) * Fix ellipse load (#2214) * Fix GT vs prediction order mismatch due to different sorting result (#2216) * Return raw anomaly maps as metadata (#2217) * Fix merge error, revert to pymongo w/o version spec --------- Signed-off-by: Songki Choi <songki.choi@intel.com> Signed-off-by: Kim, Vinnam <vinnam.kim@intel.com> Co-authored-by: Jaeguk Hyun <jaeguk.hyun@intel.com> Co-authored-by: Vinnam Kim <vinnam.kim@intel.com> Co-authored-by: Sungman Cho <sungman.cho@intel.com> Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com> Co-authored-by: Kim, Sungchul <sungchul.kim@intel.com> Co-authored-by: Yunchu Lee <yunchu.lee@intel.com> Co-authored-by: Jihwan Eom <jihwan.eom@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: sungmanc <sungmanc@intel.com> Co-authored-by: Vladislav Sovrasov <sovrasov.vlad@gmail.com> Co-authored-by: Dick Ameln <dick.ameln@intel.com>
Summary
This PR includes some draft PRs,
Tiling Optimization for Zoom Factor
Disable including full image and enable multi-batch tile classifier
And
use_ellipse_shapes
to use theEllipse
in the inference phase. It could be applied toinference
andIR inference
. So, it includes some changes in exportable_code.tile_sampling
to tiling detection task.How to test
Checklist
License
Feel free to contact the maintainers if that's a concern.