Skip to content

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.

License

Notifications You must be signed in to change notification settings

developer0hye/Explainable-YOLOv8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages