-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Update feature_visualization()
#3807
Conversation
maybe the threshold need set 16? |
@Zigars these are in units of stride. For the SPP layer you provided for example bus.jpg is of height=20 width=15. |
@Zigars PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐ |
@Zigars model summary is no longer generating feature maps after this PR. Please git pull master and try again. |
@glenn-jocher yes if run at all zeros inputs it will not generate image, but if run at reduced sizes, it will still generate like this: |
@Zigars yes of course, we want small images to output results also, otherwise users will raise bug reports on small images. |
@Zigars basically anything that is not a FLOPs forward pass or a forward pass for clearing timing information we want to run. It's not up to us how large or small user images are, we want all user images to output results. |
@glenn-jocher Is that any way can coverage the useless feature map? users maybe confuse about why generate 2 folders in one detection, and I don's suggest users visualization features in train.py, It will cause generate too many images. |
@Zigars I think everything is operating correctly. When I run detect.py it saves one png for bus.jpg and one for detect.jpg:
|
@glenn-jocher Why I generate 3 folders... |
@glenn-jocher I know the reason about it! |
@glenn-jocher If I use cuda:0 to detect, it will get these log.
|
@glenn-jocher that's the reason for why I can get a more folder in detect.py. |
@Zigars not sure what the best fix would be, as these images are the same size as the inference images to get the GPU ready for fast inference. |
@glenn-jocher I think it's not here, if you print the size, you will find this infer model's input are from 16 to 1 , in SPP: w=h=1, in first C3 :h=w=8,maybe in other way have one infer. D:\Users\ZHT\anaconda3\envs\pytorch\python.exe D:/VSCodeProject/yolov5-master/detect.py Fusing layers... |
@glenn-jocher I'm sure not here, I try to write off these code, but it still have one more folder. |
Only plot for data with height, width > 1
@Zigars update to #3804
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updated feature visualization function in
utils/plots.py
for clarity and functionality.📊 Key Changes
features
tox
to represent feature maps.module_idx
withstage
to describe the stage of the model rather than the specific module layer index.stage
instead ofmodule_idx
.🎯 Purpose & Impact
features
tox
aims to generalize the type of data visualized, making it more intuitive.module_idx
forstage
improves readability and aligns with common terminology, simplifying understanding of model structure.stage
in the file name allows for easier identification of features related to specific stages of the model, enhancing organization and interpretability.👀 Users can expect a more intuitive interface for feature visualization, with safeguards for data compatibility, and clearer organization of output images.