Replies: 2 comments 8 replies
-
|
What is your sahi mmdet mmcv torch and cuda versions? |
Beta Was this translation helpful? Give feedback.
8 replies
-
|
For mmdetection 2. The key point is here, which will modify your config's multiscaling. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@fcakyon Hello, when I use https://github.com/obss/sahi/blob/main/demo/inference_for_mmdetection.ipynb When reasoning the local model, run to result=get_ The prediction ("demo_data/small-vehicles1. jpeg", detection_model) reports an error. The error is as follows:
AssertionError Traceback (most recent call last)
File ~/anaconda3/envs/sahi/lib/python3.8/site-packages/mmcv/utils/registry.py:69, in build_from_cfg(cfg, registry, default_args)
68 try:
---> 69 return obj_cls(**args)
70 except Exception as e:
71 # Normal TypeError does not print class name.
File ~/anaconda3/envs/sahi/lib/python3.8/site-packages/mmdet/datasets/pipelines/test_time_aug.py:61, in MultiScaleFlipAug.init(self, transforms, img_scale, scale_factor, flip, flip_direction)
60 self.transforms = Compose(transforms)
---> 61 assert (img_scale is None) ^ (scale_factor is None), (
62 'Must have but only one variable can be set')
63 if img_scale is not None:
AssertionError: Must have but only one variable can be set
During handling of the above exception, another exception occurred:
AssertionError Traceback (most recent call last)
Cell In[22], line 1
----> 1 result = get_prediction("demo_data/small-vehicles1.jpeg", detection_model)
File ~/anaconda3/envs/sahi/lib/python3.8/site-packages/sahi/predict.py:91, in get_prediction(image, detection_model, shift_amount, full_shape, postprocess, verbose)
89 # get prediction
90 time_start = time.time()
...
70 except Exception as e:
71 # Normal TypeError does not print class name.
---> 72 raise type(e)(f'{obj_cls.name}: {e}')
AssertionError: MultiScaleFlipAug: Must have but only one variable can be set
I searched the Internet and failed to solve the problem. How can I solve it? I look forward to your reply.
Beta Was this translation helpful? Give feedback.
All reactions