Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.58 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.58 KB

Explainable-YOLOv8

Visualize the low-level outputs of YOLOv8 to analyze and understand the areas where our model focuses. Specifically, illustrate which anchor points are activated to predict bounding boxes.

🧍

image

👔

image

🚌

image

Green points indicate the areas where YOLOv8 focuses, with brighter green representing a higher confidence score.

Green bounding boxes represent those with high confidence scores; these boxes have not been processed with Non-Maximum Suppression (NMS).

Each arrow represents the predicted left, top, right, and bottom (LTRB) distances from the anchor points.

I am aware that my plotting method is not 👍. Feel free to modify the code to enhance the quality of the figure.

Install

pip install ultralytics==8.1.8
git clone https://github.com/developer0hye/Explainable-YOLOv8.git
cd Explainable-YOLOv8

Run

python visualize.py --model {your model}.pt --source {your data} --class_id {class id}

Execute the command below to generate the image as shown in this README file

cd Explainable-YOLOv8
python visualize.py --model yolov8m.pt --source ./ --class_id 0
python visualize.py --model yolov8m.pt --source ./ --class_id 27
python visualize.py --model yolov8m.pt --source ./ --class_id 5