Skip to content

This is a repository that decomposition the YOLOv8 architecture as an feature extractor.

Notifications You must be signed in to change notification settings

ycchen218/YOLOv8-Feature-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

YOLOv8-Image-Embedding

Introduce

This repo is to extract features from images and create embeddings by YOLOv8. YOLO stands for "You Only Look Once" and is known for its efficiency and accuracy in detecting objects in real-time.

Requirement

  1. python3.8
  2. ultralytics
  3. cv2
  4. numpy
  5. torch

Run

python  yolo_extractor.py

Architecture

image image

Detail

  1. I use the global average pooling to encode the image features from 3 dims to 2 dims, you can unuse it as you want.
  2. You can choose which YOLOv8 block you want to output by the attribute layer_index. (recommend 15~21)
  3. The image resize mechanism is the same as ultralytics.
  4. The detection block position is xywh, you can transform it by the function xywh2xyxy(x).
  5. the max_det constrains the max detection amount.

About

This is a repository that decomposition the YOLOv8 architecture as an feature extractor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages