objectDetection (Report for single object detection) and YOLO.
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!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! 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! objectdetection MATLAB Answers — New Questions