Need to know about the feature extraction procedure from YOLO_v8 backbone #5906
Replies: 1 comment 4 replies
-
@97mallikan certainly! To perform feature extraction using the backbone of a YOLOv8 model, you can utilize the Here's a concise example of how you can achieve this: from ultralytics import YOLO
# Load your YOLOv8 model
model = YOLO('yolov8n.pt') # Replace with your model path if necessary
# Perform feature extraction on a video frame
# Specify the layers from which you want to extract features
layer_indices = [10, 14, 17] # Example layer indices, adjust as needed
results = model.predict(source='path/to/your/video.mp4', embed=layer_indices)
# Iterate over results to access the embeddings
for result in results:
embeddings = result.embeddings # List of feature tensors from the specified layers
# Now you can use these embeddings for your application The For more detailed information on using the |
Beta Was this translation helpful? Give feedback.
-
I am using YOLO_v8 to detect objects from video files. Now I want to perform feature extraction on frames of video files using the backbone section of that YOLO_v8 model.
Can anyone guide me on how can I do that? If there is any documentation or example that exists please share it with me, it would be very helpful to me.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions