-
Notifications
You must be signed in to change notification settings - Fork 0
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
ImportError: cannot import name 'inference_segmentor' from 'mmseg.apis' #9
Comments
@nnmaitian Did you follow the specific version of mmsegmentation? |
Yes. I use the following code to specify the mmseg version and installation. git reset --hard 356215bf586b1404d4cb0c205685fcf589df6148 But still ImportError: cannot import name 'show_seg' from 'mmseg.apis' |
@nnmaitian This is a little bit weird. I'll check it this weekend. |
@nnmaitian I used the latest version of mmsegmentation, and modified artifact_detection.py as above to use the latest version of mmsegmentation. When editing, be sure to change not only the import part but also the function name used below. Accordingly, an error message may appear saying that the necessary files are not in the appropriate directory, but when I set the file path according to the error message, quick-inference was even executable. |
@201210302 Hello, can you get the same results in this situation? If so, I will directly adopt your strategy. |
@nnmaitian I uploaded the artifact_detection.py I used. https://github.com/201210302/DeSRA_execution/tree/main/mmsegmentation/demo |
Hi, thank you for your answer. Your link is invalid because the question was closed. I can't see your updated artifact_detection.py file. Can you post it directly under the question? |
Hello, is there any solution to the problem I encountered? |
@nnmaitian I can check the code uploaded by @201210302. You should directly copy the link (not click) to a new webpage. Maybe you can try this modified file first. |
@nnmaitian I corrected the link |
@201210302 I used your artifact_detection.py, but encountered: |
@201210302 hi, thank you for your answer.Now my version is mmcv 2.0.0rc4, mmsegmentation v1.2.2. artifact_detection.py used your link. But I encountered the following problem. |
@nnmaitian @haikunzhang95 I will soon summarize the execution method I did and post it on my GitHub Readme. I will also re-upload the artifact_detection.py file used. |
@nnmaitian I updated the artifact_detection.py in my github https://github.com/201210302/DeSRA_execution/tree/main/mmsegmentation/demo |
@nnmaitian @LiangbinXie I upload the explanation of DeSRA execution: https://github.com/201210302/DeSRA_execution. Also, you need to redownload artifact_detection.py(I modified it) |
It seems in the newer version, the |
Hello, I encountered the following problem, from mmseg.apis import inference_segmentor, init_segmentor, show_seg
ImportError: cannot import name 'inference_segmentor' from 'mmseg.apis' . How to solve it.
The text was updated successfully, but these errors were encountered: