Skip to content
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

how to visualize the detection results? #13

Open
HuangLian126 opened this issue Nov 2, 2020 · 11 comments
Open

how to visualize the detection results? #13

HuangLian126 opened this issue Nov 2, 2020 · 11 comments

Comments

@HuangLian126
Copy link

No description provided.

@YoungXIAO13
Copy link
Owner

Hi @HuangLian126

You can run test.py with args --vis, then the visualisation is on.

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

Hi @HuangLian126

You can run test.py with args --vis, then the visualisation is on.

Sorry to bother you, I also wanted to see the visual results during the test, but there was an error:
File "/home/xxx/FewShotDetection-master/test.py", line 335, in
im = cv2.imread(imdb.image_path_from_index(int(data[4])))
File "/home/xxx/FewShotDetection-master/lib/datasets/pascal_voc.py", line 93, in image_path_from_index
image_path = os.path.join(self._data_path, 'JPEGImages', index + self._image_ext)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
When the second error message is located, there is no problem running debug. I don’t know the reason. If you have encountered it, please let me know.

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

No description provided.

Did you successfully get the visual result?

@HuangLian126
Copy link
Author

No description provided.

Did you successfully get the visual result?

No description provided.

Did you successfully get the visual result?

Yes, I successfully get the visual result. You can check your Pytorch version.

@YoungXIAO13
Copy link
Owner

Hi @NHW2017 ,

I think your problem comes from this line:
image_path = os.path.join(self._data_path, 'JPEGImages', index + self._image_ext)

Could you try modify it as:
image_path = os.path.join(self._data_path, 'JPEGImages', str(index) + self._image_ext)
to see if the issue is resolved?

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

Hi @NHW2017 ,

I think your problem comes from this line:
image_path = os.path.join(self._data_path, 'JPEGImages', index + self._image_ext)

Could you try modify it as:
image_path = os.path.join(self._data_path, 'JPEGImages', str(index) + self._image_ext)
to see if the issue is resolved?

No, I have tried this modification, but a new error appears and the file path cannot be found

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

No description provided.

Did you successfully get the visual result?

No description provided.

Did you successfully get the visual result?

Yes, I successfully get the visual result. You can check your Pytorch version.

torch==0.4.0?

@YoungXIAO13
Copy link
Owner

Then I think you might need to check the dataset is well downloaded as structured as suggested

@HuangLian126
Copy link
Author

@NHW2017 torch==0.4, torchvision==0.21

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

Then I think you might need to check the dataset is well downloaded as structured as suggested

I don't quite understand, because I had no problems during training and testing, but this error occurred during --vis, so I think the error is not due to the configuration of the data set

@NHW2017
Copy link

NHW2017 commented Nov 18, 2020

@NHW2017 torch==0.4, torchvision==0.21

Which version of python do you use and whether you have modified other parts of the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants