Yolo V7 vs V8

 

V7 vs V8 comparison

https://youtu.be/k1dOZFcLOek

https://youtu.be/tpOGDclq7KY

https://youtu.be/u5qxN2ACEP4

https://youtu.be/85SH08jN4dY

This is a comparison video between yolo v7 and v8.

Here is information for each version

Testing Computer :

  • Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz
  • RTX 4090

Something might be useful code

  • yolo v8, video writer for detection result
import cv2
import time
from ultralytics import YOLO

def process_video(model, video_path, output_path):
cap = cv2.VideoCapture(video_path)
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
fps = int(cap.get(cv2.CAP_PROP_FPS))

# Create a VideoWriter object to save the annotated video
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
out = cv2.VideoWriter(output_path, fourcc, fps, (width, height))

while cap.isOpened():
success, frame = cap.read()

if success:
start_time = time.time()
results = model(frame)
end_time = time.time()
processing_time = end_time - start_time
fps = 1/processing_time
# Visualize the results on the frame
annotated_frame = results[0].plot()
# Display the processing time on the annotated frame
cv2.putText(annotated_frame, f"Processing time: {processing_time:.4f} seconds / {fps:.4f} fps",
(10, 30), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 2)

# Write the annotated frame to the output video
out.write(annotated_frame)

# cv2.imshow("YOLOv8 Inference", annotated_frame)
# if cv2.waitKey(1) & 0xFF == ord("q"):
# break
else:
break

cap.release()
out.release()

def main():
# Load the YOLO model
model = YOLO('yolov8x.pt')

# List of video files
video_paths = [
"../video/videoplayback-1.mp4",
"../video/videoplayback-2.mp4",
"../video/videoplayback-3.mp4",
"../video/videoplayback-4.mp4",
]

# Loop through video files and process them
for i, video_path in enumerate(video_paths):
output_path = f"../video/yolo_88_output_{i+1}.mp4"
process_video(model, video_path, output_path)

cv2.destroyAllWindows()

if __name__ == '__main__':
main()
  • make 2 video to side by side

Combine Two Videos Side by Side with OpenCV python

Thank you! 😺

Overview of AI Models for Image Object Detection, OCR, Image Captioning, and Full Image Information Extraction

 There are several deep learning models that can be used to detect and recognize objects in images, perform OCR, and generate image descriptions. Here are a few popular models for each task:

  1. Object detection:

  2. OCR:

  3. Image captioning:

  4. Full-image information extraction:

    • Textract is an AWS service that automatically extracts text and data from scanned documents and images. It supports a variety of document types, including tables and forms. More information can be found on the AWS website: https://aws.amazon.com/textract/




semantic segmentation vs instance segmentation

 




* semantic segmentation
Finding out which class each pixel belongs to

* instance segmentation
To find out the pixel position of a detected object class based on object detection(localisation)

Is that confuse? ^^

Thank you.
🙇🏻‍♂️

www.marearts.com