TestingViscosity / check_annotation.asv
biplab2008's picture
single file added
dc7407d
raw
history blame contribute delete
895 Bytes
%% copy files randomly
copy_files = false;
path = 'D:\All_files\pys\AI_algos\Mikes_Work\viscosity-video-classification\code_digdiscovery\annotate\';
file_path = 'D:\All_files\pys\AI_algos\Mikes_Work\viscosity-video-classification\code_digdiscovery\new_honey_164\';
cropped_path = [path, 'cropped'];
tot_frames = 1;
folders = dir(file_path);
if copy_files
for i = 1: length(folders)
if ~strcmp(folders(i).name,'.') && ~strcmp(folders(i).name,'..')
frame_list = randperm(30,tot_frames);
for j = 1 : tot_frames
frames = ['frame_',num2str(frame_list(j)),'.jpg'];
copyfile([file_path,folders(i).name,'\',frames],[path,folders(i).name,'_',frames]);
end
end
end
end
%% check a single image and crop the rest using the smale BBox
files = dir(path);
figure;
file = '2202_frame_6.jpg';
img = imread(file);i