Resize bug in inference
See original GitHub issue- When input the width and height of the image are not equal, sizes of input arguments that do not match will occur
Line 152 in ./anomalib/deploy/inferencers/torch.py should be anomaly_map = cv2.resize(anomaly_map, (meta_data["image_shape"][1], meta_data["image_shape"][0]))
meta_data[“image_shape”] is (image_width, image_height)
-# cv2.resize(img, (image_height,image_width ),interpolation=cv2.INTER_CUBIC)
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
The dangers behind image resizing - Zuru Tech
Usually, we resize the input of a machine learning model mainly because models train faster on smaller images. An input image that is...
Read more >Floor - Cast - Resize(or Slice) cause internal error - TensorRT
Hi, NVIDIA guys. I'm facing internal error when using trtexec to convert onnx to engine. I provide a minimal test case to reproduce...
Read more >Preprocessors — OpenVINO™ documentation — Version(latest)
Preprocessor is a class which processes input data before model inference. ... resize - resizing the image to a new width and height....
Read more >[MS][LITE][resize]using package for cpu_gpu_ascend ... - Gitee
[MS][LITE][resize]using package for cpu_gpu_ascend, cbg_ai_ocr_detect_straight.pb inference failed. TODO. #I660IF Bug-Report.
Read more >Resizing layer in Tensorflow crashes because of different ...
The error is that you cannot batch elements of different sizes. There's unfortunately no way around that. The documentation specifies that ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@raviv https://github.com/openvinotoolkit/anomalib/pull/135 should solve the
image_size
problems for both training and inference for most models. Patchcore and GANomaly still do not allow changing the image size, but this will be addressed separately, see https://github.com/openvinotoolkit/anomalib/issues/136 and https://github.com/openvinotoolkit/anomalib/issues/40.@raviv PR #140 has now been merged, and the issue should be fixed. Feel free to re-open it if you think there is still an issue