Effacer les filtres
Effacer les filtres

objectDetection (Report for single object detection) and YOLO.

10 vues (au cours des 30 derniers jours)
BASHIR AHMAD RASHEEDY
BASHIR AHMAD RASHEEDY le 2 Juin 2024
Hello everyone!
I need some help with using the Object Detection function in YOLO to obtain detection results based on frames. I've tried various codes, but the results are not what I expect. Any advice or guidance would be greatly appreciated.
for example
Video = VideoReader("tr.avi",CurrentTime=0);
player = vision.VideoPlayer;
detections = {};
measurementNoise = 10;
while hasFrame(Video)
frame = readFrame(Video);
frameIndex = round(Video.CurrentTime * Video.FrameRate);
[bbox, score, label] = detect(detector, frame);
if length(detections) < frameIndex
detections{frameIndex} = {};
end
for i = 1:length(score)
detections{frameIndex}{end+1} = objectDetection(frameIndex, bbox(i,:), ...
"MeasurementNoise", measurementNoise, "ObjectAttributes", struct("Score", score(i)));
end
Object = insertObjectAnnotation(frame, "rectangle", bbox, label, "Color", "green");
step(player, Object);
end
Thank you!

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by