-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
Error running python detect.py --visualize #5503
Comments
@ys31jp 👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. We've tried to reproduce this issue but everything works correctly for us using your commands: We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem. How to create a Minimal, Reproducible ExampleWhen asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:
For Ultralytics to provide assistance your code should also be:
If you believe your problem meets all the above criteria, please close this issue and raise a new one using the 🐛 Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem. Thank you! 😃 |
@ys31jp |
Hi, thanks for prompt response. I test again. If I test with However if I test with image 1/1 E:\Documents\yolov5_ver6_no_modify\yolov5-master\data\image.jpg: Saving runs\detect\exp6\image_0123.fr0123\stage0_Conv_features.png... (32/32) #Zengyf-CVer Yes. It was due to the path issues. Because all of image name is somethings like this image_0123.fr0123. I have try to fixed this to check the feature map. |
@ys31jp |
I cant. I have few k of dataset images with the ".". Which impossible for me to avoid. |
@ys31jp can you please submit a Pull Request with your fix to help other users? Thanks! Please see our ✅ Contributing Guide to get started. |
Fix for #5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
@ys31jp good news 😃! Your original issue may now be fixed ✅ in PR #5518. This PR updates To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
Fix for #5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
Error running python detect.py --visualize ultralytics#5503
Hi @glenn-jocher I've pull request for this issues. Not sure am I do it correctly. Thanks for the response. Thanks for your team too. |
* Update plots.py Error running python detect.py --visualize #5503 * Update plots.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Fix for ultralytics#5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
* Update plots.py Error running python detect.py --visualize ultralytics#5503 * Update plots.py Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Fix for ultralytics/yolov5#5503 ``` python detect.py --visualize --source path/to/file.suffix1.jpg ```
Search before asking
Question
python detect.py --visualize
image 1/1 E:\Documents\yolov5_ver6_no_modify\yolov5-master\data\data_remove\image.jpg: Saving runs\detect\exp6\image\stage0_Conv_features.png... (32/32)
Traceback (most recent call last):
File "detect.py", line 307, in
main(opt)
File "detect.py", line 302, in main
run(**vars(opt))
File "E:\anaconda3\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "detect.py", line 151, in run
pred = model(img, augment=augment, visualize=visualize)[0]
File "E:\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "E:\Documents\yolov5_ver6_no_modify\yolov5-master\models\yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "E:\Documents\yolov5_ver6_no_modify\yolov5-master\models\yolo.py", line 152, in _forward_once
feature_visualization(x, m.type, m.i, save_dir=visualize)
File "E:\Documents\yolov5_ver6_no_modify\yolov5-master\utils\plots.py", line 446, in feature_visualization
plt.savefig(save_dir / f, dpi=300, bbox_inches='tight')
File "E:\anaconda3\lib\site-packages\matplotlib\pyplot.py", line 859, in savefig
res = fig.savefig(*args, **kwargs)
File "E:\anaconda3\lib\site-packages\matplotlib\figure.py", line 2311, in savefig
self.canvas.print_figure(fname, **kwargs)
File "E:\anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 2210, in print_figure
result = print_method(
File "E:\anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 1639, in wrapper
return func(*args, **kwargs)
File "E:\anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 510, in print_png
mpl.image.imsave(
File "E:\anaconda3\lib\site-packages\matplotlib\image.py", line 1605, in imsave
image.save(fname, **pil_kwargs)
File "E:\anaconda3\lib\site-packages\PIL\Image.py", line 2148, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: 'runs\detect\exp6\image\stage0_Conv_features.png'
Hi, I have this error when I run detect.py --visualize.
Any ideas why I have this error?
Additional
No response
The text was updated successfully, but these errors were encountered: