You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These values were copied from the pyro-vision/README.md file. Further internet searches showed me these values are the mean and standard deviation values of the ImageNet image database.
Here is an image I ran through my script. It shows a wildfire I photographed with my iPhone a few summers ago.
Here is that same image, transformed using the ImageNet values shown above. Notice the transform has left the smoke with a color closely matching the surrounding sky. The pyro-vision model predicted this image is negative for wildfire.
My manual visual inspection led to this insight. So, just for a baseline, I changed the transform to:
normalize = transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
This resulted in this normalized image:
Using this last image transform, pyro-vision predicted this image is positive for wildfire.
This investigation leads me to recommend developing a color transform that is specific to the wildfire smoke training set rather than using the general purpose ImageNet as the source of those values.
Bug description
I wrote a short python script to try out the pyro-vision model. It can be found at https://github.com/KevinJMcEntee/WildfireDetector. It contains this image color normalization transform:
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
These values were copied from the pyro-vision/README.md file. Further internet searches showed me these values are the mean and standard deviation values of the ImageNet image database.
Here is an image I ran through my script. It shows a wildfire I photographed with my iPhone a few summers ago.
Here is that same image, transformed using the ImageNet values shown above. Notice the transform has left the smoke with a color closely matching the surrounding sky. The pyro-vision model predicted this image is negative for wildfire.
My manual visual inspection led to this insight. So, just for a baseline, I changed the transform to:
normalize = transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
This resulted in this normalized image:
Using this last image transform, pyro-vision predicted this image is positive for wildfire.
This investigation leads me to recommend developing a color transform that is specific to the wildfire smoke training set rather than using the general purpose ImageNet as the source of those values.
Code snippet to reproduce the bug
No Errors
Error traceback
No Errors
Environment
python3 on Macbook Air running MacOS 12.6. Using values from pyro-vision as of November 14, 2022. Script found at https://github.com/KevinJMcEntee/WildfireDetector/blob/main/cliWildFireDetect.py
The text was updated successfully, but these errors were encountered: