Mercurial > repos > greg > yolo
comparison yolo.xml @ 23:53a9c312fe7a draft
Uploaded
author | greg |
---|---|
date | Thu, 19 Oct 2017 10:01:49 -0400 |
parents | 87c8a4b6020d |
children | f191e0b8fa1d |
comparison
equal
deleted
inserted
replaced
22:87c8a4b6020d | 23:53a9c312fe7a |
---|---|
6 <command detect_errors="exit_code"><![CDATA[ | 6 <command detect_errors="exit_code"><![CDATA[ |
7 mkdir output_shape_confidence_dir && | 7 mkdir output_shape_confidence_dir && |
8 mkdir input_dir && | 8 mkdir input_dir && |
9 mkdir output_png_dir && | 9 mkdir output_png_dir && |
10 cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . | 10 cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . |
11 #for $i in $input: | 11 #set input $input_type_cond.input |
12 #set input_filename = $i.file_name | 12 #if str($input_type_cond.input_type) == 'image': |
13 #set full_name = $i.name | 13 #set input_filename = $input.file_name |
14 #set full_name = $input.name | |
14 #set head = $full_name.split('.')[0] | 15 #set head = $full_name.split('.')[0] |
15 #set output_filename_png = '%s_predictions.png' % $head | 16 #set output_filename_png = '%s_predictions.png' % $head |
16 #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head | 17 #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head |
17 && ln -s $input_filename input_dir/$full_name | 18 && ln -s $input_filename input_dir/$full_name |
18 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence | 19 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence |
19 && mv ./predictions.png output_png_dir/$output_filename_png | 20 && mv ./predictions.png output_png_dir/$output_filename_png |
20 #end for | 21 #else: |
22 #for $i in $input: | |
23 #set input_filename = $i.file_name | |
24 #set full_name = $i.name | |
25 #set head = $full_name.split('.')[0] | |
26 #set output_filename_png = '%s_predictions.png' % $head | |
27 #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head | |
28 && ln -s $input_filename input_dir/$full_name | |
29 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence | |
30 && mv ./predictions.png output_png_dir/$output_filename_png | |
31 #end for | |
32 #end if | |
21 ]]></command> | 33 ]]></command> |
22 <inputs> | 34 <inputs> |
23 <param name="input" format="jpg" type="data_collection" collection_type="list" label="Collection of image files" /> | 35 <conditional name="input_type_cond"> |
24 <param name="thresh" type="float" value="0.25" label="Object detection threshold" /> | 36 <param name="input_type" type="select" label="Select"> |
37 <option value="image" selected="true">a single image</option> | |
38 <option value="images">a collection of images</option> | |
39 </param> | |
40 <when value="image"> | |
41 <param name="input" format="jpg" type="data" label="Image"/> | |
42 </when> | |
43 <when value="images"> | |
44 <param name="input" format="jpg" type="data_collection" collection_type="list" label="Collection of image files"/> | |
45 </when> | |
46 </conditional> | |
47 <param name="thresh" type="float" value="0.25" label="Object detection threshold"/> | |
25 <param name="output_shape_confidence" type="select" display="radio" label="Output shape detection confidence levels?"> | 48 <param name="output_shape_confidence" type="select" display="radio" label="Output shape detection confidence levels?"> |
26 <option value="yes" selected="true">Yes</option> | 49 <option value="yes" selected="true">Yes</option> |
27 <option value="no">No</option> | 50 <option value="no">No</option> |
28 </param> | 51 </param> |
29 </inputs> | 52 </inputs> |
30 <outputs> | 53 <outputs> |
31 <collection name="output_shape_confidence" type="list" label="${tool.name} (shape detection confidence) on ${on_string}"> | 54 <data name="output_shape_confidence" format="tabular" label="${tool.name} (shape detection confidence) on ${on_string}"> |
55 <filter>input_type_cond['input_type'] == 'image' and output_shape_confidence == 'yes'</filter> | |
56 </data> | |
57 <data name="output_shape" format="png" label="${tool.name} (shapes) on ${on_string}"> | |
58 <filter>input_type_cond['input_type'] == 'image'</filter> | |
59 </data> | |
60 <collection name="output_shape_confidences" type="list" label="${tool.name} (shape detection confidence) on ${on_string}"> | |
32 <discover_datasets pattern="__name__" directory="output_shape_confidence_dir" format="tabular" /> | 61 <discover_datasets pattern="__name__" directory="output_shape_confidence_dir" format="tabular" /> |
33 <filter>output_shape_confidence == 'yes'</filter> | 62 <filter>input_type_cond['input_type'] == 'images' and output_shape_confidence == 'yes'</filter> |
34 </collection> | 63 </collection> |
35 <collection name="output_shape" type="list" label="${tool.name} (shapes) on ${on_string}"> | 64 <collection name="output_shapes" type="list" label="${tool.name} (shapes) on ${on_string}"> |
36 <discover_datasets pattern="__name__" directory="output_png_dir" format="png" /> | 65 <discover_datasets pattern="__name__" directory="output_png_dir" format="png" /> |
66 <filter>input_type_cond['input_type'] == 'images'</filter> | |
37 </collection> | 67 </collection> |
38 </outputs> | 68 </outputs> |
39 <tests> | 69 <tests> |
40 <test> | 70 <test> |
41 </test> | 71 </test> |