Using a live camera feed, I want to detect certain a particular very simple logo in real time, this logo could be found on billboards or literally anywhere else.
Is it more appropriate to use orb or yolo (with custom trained model) for this?
Using a live camera feed, I want to detect certain a particular very simple logo in real time, this logo could be found on billboards or literally anywhere else.
Is it more appropriate to use orb or yolo (with custom trained model) for this?
I tried using orb but it was a complete mess, it just detected random places in the image with my template image, maybe there was some particular setting I was supposed to use?
This is my code:
import cv2
import numpy as np
print("hello")
# Load the main image and convert it to grayscale
main_image = cv2.imread('test_img.jpeg')
gray_main = cv2.cvtColor(main_image, cv2.COLOR_BGR2GRAY)
# Load the template image and convert it to grayscale
template = cv2.imread('template.png', 0)
# Initialize the ORB detector
orb = cv2.ORB_create()
# Find keypoints and descriptors for the main image and the template
kp_main, des_main = orb.detectAndCompute(gray_main, None)
kp_template, des_template = orb.detectAndCompute(template, None)
# Match descriptors
bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True)
matches = bf.match(des_main, des_template)
# Sort them in the order of their distance
matches = sorted(matches, key=lambda x: x.distance)
# Draw the first N matches (N=10 in this example)
out_img = cv2.drawMatches(gray_main, kp_main, template, kp_template, matches[:10], None, flags=cv2.DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS)
# Display the output image
cv2.imshow('Matches', out_img)
cv2.waitKey(0)
cv2.destroyAllWindows()
Maybe I did something wrong?
that’s no wonder, it isn’t made for object detection
(more to get a homography from 2 views of the same scene)
sorry I missed read that, I should have tried orb yolo, I assume I need to train a model to do this.
Yeah that’s true
You should think critically about that suggestion. It might have been AI-generated. And that suggestion contained no detail/elaboration.
I have never heard of ORB and YOLO being combined substantially.
ORB is a feature descriptor. YOLO Is a neural network for object detection. Object detection was done with feature descriptors and clustering.