YOLOv5 Source: https://github.com/ultralytics/yolov5
Grad-CAM Source: https://github.com/jacobgil/pytorch-grad-cam
- Check 'yolov5' folder, read usage first
- Structure your files as yolov5's input
- Run train.py for training
- and detect.py to save detection results (if you're not interesting at interpreting results, you can skip from here.)
- We're interpreting classification results only, not including detection
- Run train.py for training yolo_classifier: submodel of yolov5 with detecting architecture removed
- Make sure you use the same structure as yolov5 (s, m, l, x).
- Classification results will be SAME between original yolo and yolo_classifier
- In 'pytorch-grad-cam' folder
- Modify 'model' to the same model as you used before
- Modify 'ckpt' to your own trained weight
- Run script(check pytorch-grad-cam usage)