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

Label visualization problems in test.py #3

Open
jsago opened this issue Nov 30, 2022 · 3 comments
Open

Label visualization problems in test.py #3

jsago opened this issue Nov 30, 2022 · 3 comments

Comments

@jsago
Copy link

jsago commented Nov 30, 2022

I want to know whether the code of test.py has not been modified,The proportion of the gt box in the visualization image becomes thinner,It's strange, but it's not like this in detect.py,and labels in the .txt format are only horizontal boxes, and only four coordinate parameters are included
image
image
image
image

@lx-cly
Copy link
Owner

lx-cly commented Dec 1, 2022

when creating val_dataloader,the sign of rect is opened. the targets normalized to pixel format is wrong. Now,rect=False,the gt box in visualization is correct.And in detect.py, I just save hbb pred results in the .txt format and save poly pred results in the .json format.If you want to get obb results, please save the json format.

@jsago
Copy link
Author

jsago commented Dec 3, 2022

when creating val_dataloader,the sign of rect is opened. the targets normalized to pixel format is wrong. Now,rect=False,the gt box in visualization is correct.And in detect.py, I just save hbb pred results in the .txt format and save poly pred results in the .json format.If you want to get obb results, please save the json format.

Thank you very much for removing my doubts. I have another question. I hope I can get your answer. When I set task to speed or study in test.py, an error is reported:
Traceback (most recent call last):
File "D:/Scientific_Research/YOLOv7_OBB_KLD/my_test.py", line 404, in
plots=False, v5_metric=opt.v5_metric)
File "D:/Scientific_Research/YOLOv7_OBB_KLD/my_test.py", line 60, in test
model = attempt_load(weights, map_location=device) # load FP32 model
File "D:\Scientific_Research\YOLOv7_OBB_KLD\models\experimental.py", line 252, in attempt_load
ckpt = torch.load(w, map_location=map_location) # load
File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
PermissionError: [Errno 13] Permission denied: '.'

@lx-cly
Copy link
Owner

lx-cly commented Dec 3, 2022

when creating val_dataloader,the sign of rect is opened. the targets normalized to pixel format is wrong. Now,rect=False,the gt box in visualization is correct.And in detect.py, I just save hbb pred results in the .txt format and save poly pred results in the .json format.If you want to get obb results, please save the json format.

Thank you very much for removing my doubts. I have another question. I hope I can get your answer. When I set task to speed or study in test.py, an error is reported: Traceback (most recent call last): File "D:/Scientific_Research/YOLOv7_OBB_KLD/my_test.py", line 404, in plots=False, v5_metric=opt.v5_metric) File "D:/Scientific_Research/YOLOv7_OBB_KLD/my_test.py", line 60, in test model = attempt_load(weights, map_location=device) # load FP32 model File "D:\Scientific_Research\YOLOv7_OBB_KLD\models\experimental.py", line 252, in attempt_load ckpt = torch.load(w, map_location=map_location) # load File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 579, in load with _open_file_like(f, 'rb') as opened_file: File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "D:\Software Area\Anaconda\envs\Pytorch\lib\site-packages\torch\serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) PermissionError: [Errno 13] Permission denied: '.'

when you set task to speed or study in test.py,parser.add_argument('--weights'...) default=['{your_weigthts}'].
elif opt.task == 'speed': # speed benchmarks **for w in opt.weights**:

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

2 participants