pifalken / YOLOv3-GradCAM

GradCAM algorithm implementation for YOLOv3
28 stars 14 forks source link

What do I have to do to move it? #5

Open kotamumu opened 4 years ago

kotamumu commented 4 years ago

I am very afraid of asking this kind of basic question but I don't know how to use this program. Can someone please tell me how to use it? I will probably incorporate "ultralytics/yolov3", but I don't know what to do after that. environment is using Google colab.

pifalken commented 4 years ago

Don't be afraid to ask basic questions, we all start somewhere.

Currently this repo does not work as I've not yet fixed https://github.com/pifalken/YOLOv3-GradCAM/issues/3#issuecomment-631447253. I have not yet found the time to commit to fixing it.

With that being said, in order to run this, you'll need a trained YOLOv3 model. The ultralytics repo will work just fine. Once you have a trained model, you simply run python gradcam.py. The code will then do a forward pass on the trained model and output a localization map of important regions.

  1. Train model
  2. Tell gradcam.py where the model weights are stored

You will need to change the following lines to reflect where your cfg and weights are saved, respectively https://github.com/pifalken/YOLOv3-GradCAM/blob/6a66a9eb469e43c0d42c7d1ce84eea9c16cff3da/gradcam/gradcam.py#L169-L170

Also be weary of changing to a CPU model instead of CUDA if required.

# @TODO: I need to add functionality for passing arguments so that editing the code isn't necessary.

kotamumu commented 4 years ago

Thank you for your reply. Thank you so much for showing me how it works. And I encountered an error as in #3. It's not something I'm capable of solving, but I'm really looking forward to getting this repository working and I am.

wllkk commented 4 years ago

Thank you for your reply. Thank you so much for showing me how it works. And I encountered an error as in #3. It's not something I'm capable of solving, but I'm really looking forward to getting this repository working and I am.

hi,I have the same problem as you,Did you solve it?please help me. thanks for your help.