# HG changeset patch # User greg # Date 1508421709 14400 # Node ID 53a9c312fe7add58ae1fadeef47ba73179d1961e # Parent 87c8a4b6020da99c0813f19d3fb8fb0ec9a47135 Uploaded diff -r 87c8a4b6020d -r 53a9c312fe7a yolo.xml --- a/yolo.xml Wed Oct 18 13:31:46 2017 -0400 +++ b/yolo.xml Thu Oct 19 10:01:49 2017 -0400 @@ -8,32 +8,62 @@ mkdir input_dir && mkdir output_png_dir && cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . -#for $i in $input: - #set input_filename = $i.file_name - #set full_name = $i.name +#set input $input_type_cond.input +#if str($input_type_cond.input_type) == 'image': + #set input_filename = $input.file_name + #set full_name = $input.name #set head = $full_name.split('.')[0] #set output_filename_png = '%s_predictions.png' % $head #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head && ln -s $input_filename input_dir/$full_name && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence && mv ./predictions.png output_png_dir/$output_filename_png -#end for +#else: + #for $i in $input: + #set input_filename = $i.file_name + #set full_name = $i.name + #set head = $full_name.split('.')[0] + #set output_filename_png = '%s_predictions.png' % $head + #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head + && ln -s $input_filename input_dir/$full_name + && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence + && mv ./predictions.png output_png_dir/$output_filename_png + #end for +#end if ]]> - - + + + + + + + + + + + + + - + + input_type_cond['input_type'] == 'image' and output_shape_confidence == 'yes' + + + input_type_cond['input_type'] == 'image' + + - output_shape_confidence == 'yes' + input_type_cond['input_type'] == 'images' and output_shape_confidence == 'yes' - + + input_type_cond['input_type'] == 'images'