matlab yolov2对整个测试集的图片进行预测的代码

这个是matlab代码对yolov2生成的模型进行测试的代码,他会在图片生成boundingbox.

close all;clear;clc
gpuDevice(1);

load standard_cell2_detector_yolov2_0611_epoch50_changeanchor.mat;
test_image_folder = './predictdata_900_900_crop';

test_output_folder = 'test_cell_detection;
#带有boundingbox的图片测试结果的输出路径
bbox_output_folder = 'cell2_yolov2_bbox_black_white'
test_files = dir(test_image_folder);
length(test_files)

%make output folder
if ~isdir(test_output_folder)
    fprintf(1, 'Making directory %s\n', test_output_folder);
    mkdir(test_output_folder);
end

if ~isdir(bbox_output_folder)
    fprintf(1, 'Making directory %s\n', test_output_folder);
    mkdir(bbox_output_folder);
end

for k = 3 : length(test_files)
%for k = 3 : 10
    baseFileName = test_files(k).name;
    fullFileName = fullfile(test_image_folder, baseFileName);
    tic;
    I = imread(fullFileName);
    [bboxes,scores,labels] = detect(detector,I,'T
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值