Mercurial > repos > greg > yolo
comparison yolo.xml @ 26:17f0c9ef9da3 draft
Uploaded
author | greg |
---|---|
date | Thu, 19 Oct 2017 10:35:04 -0400 |
parents | f8b16e55b18c |
children | b416787d41b0 |
comparison
equal
deleted
inserted
replaced
25:f8b16e55b18c | 26:17f0c9ef9da3 |
---|---|
2 <description>real-time object detection</description> | 2 <description>real-time object detection</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.0">darknet</requirement> | 4 <requirement type="package" version="1.0">darknet</requirement> |
5 </requirements> | 5 </requirements> |
6 <command detect_errors="exit_code"><![CDATA[ | 6 <command detect_errors="exit_code"><![CDATA[ |
7 mkdir output_shape_confidence_dir && | |
8 mkdir input_dir && | 7 mkdir input_dir && |
9 mkdir output_png_dir && | |
10 cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . | 8 cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . |
11 #set input = $input_type_cond.input | 9 #set input = $input_type_cond.input |
12 #if str($input_type_cond.input_type) == 'image': | 10 #if str($input_type_cond.input_type) == 'image': |
13 #set input_filename = $input.file_name | 11 #set input_filename = $input.file_name |
14 #set full_name = $input.name | 12 #set full_name = $input.name |
15 && ln -s $input_filename input_dir/$full_name | 13 && ln -s $input_filename input_dir/$full_name |
16 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > $output_shape_confidence | 14 #if str($output_shape_confidence_log) == 'yes': |
15 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh 2> $output_shape_confidence | |
16 #else: | |
17 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh 2> /dev/null | |
17 && mv ./predictions.png $output_shape | 18 && mv ./predictions.png $output_shape |
18 #else: | 19 #else: |
20 && mkdir output_shape_confidence_dir | |
21 && mkdir output_png_dir | |
19 #for $i in $input: | 22 #for $i in $input: |
20 #set input_filename = $i.file_name | 23 #set input_filename = $i.file_name |
21 #set full_name = $i.name | 24 #set full_name = $i.name |
22 #set head = $full_name.split('.')[0] | 25 #set head = $full_name.split('.')[0] |
23 #set output_filename_png = '%s_predictions.png' % $head | 26 #set output_filename_png = '%s_predictions.png' % $head |
24 #set output_filename_shape_confidence = '%s_shape_detection_confidence.tabular' % $head | 27 #set output_filename_shape_confidence = '%s_shape_detection_confidence.txt' % $head |
25 && ln -s $input_filename input_dir/$full_name | 28 && ln -s $input_filename input_dir/$full_name |
26 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh > output_shape_confidence_dir/$output_filename_shape_confidence | 29 && darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$full_name' -thresh $thresh 2> output_shape_confidence_dir/$output_filename_shape_confidence |
27 && mv ./predictions.png output_png_dir/$output_filename_png | 30 && mv ./predictions.png output_png_dir/$output_filename_png |
28 #end for | 31 #end for |
29 #end if | 32 #end if |
30 ]]></command> | 33 ]]></command> |
31 <inputs> | 34 <inputs> |
46 <option value="yes" selected="true">Yes</option> | 49 <option value="yes" selected="true">Yes</option> |
47 <option value="no">No</option> | 50 <option value="no">No</option> |
48 </param> | 51 </param> |
49 </inputs> | 52 </inputs> |
50 <outputs> | 53 <outputs> |
51 <data name="output_shape_confidence" format="tabular" label="${tool.name} (shape detection confidence) on ${on_string}"> | 54 <data name="output_shape_confidence" format="txt" label="${tool.name} (shape detection confidence) on ${on_string}"> |
52 <filter>input_type_cond['input_type'] == 'image' and output_shape_confidence_log == 'yes'</filter> | 55 <filter>input_type_cond['input_type'] == 'image' and output_shape_confidence_log == 'yes'</filter> |
53 </data> | 56 </data> |
54 <data name="output_shape" format="png" label="${tool.name} (shapes) on ${on_string}"> | 57 <data name="output_shape" format="png" label="${tool.name} (shapes) on ${on_string}"> |
55 <filter>input_type_cond['input_type'] == 'image'</filter> | 58 <filter>input_type_cond['input_type'] == 'image'</filter> |
56 </data> | 59 </data> |
57 <collection name="output_shape_confidences" type="list" label="${tool.name} (shape detection confidence) on ${on_string}"> | 60 <collection name="output_shape_confidences" type="list" label="${tool.name} (shape detection confidence) on ${on_string}"> |
58 <discover_datasets pattern="__name__" directory="output_shape_confidence_dir" format="tabular" /> | 61 <discover_datasets pattern="__name__" directory="output_shape_confidence_dir" format="txt"/> |
59 <filter>input_type_cond['input_type'] == 'images' and output_shape_confidence_log == 'yes'</filter> | 62 <filter>input_type_cond['input_type'] == 'images' and output_shape_confidence_log == 'yes'</filter> |
60 </collection> | 63 </collection> |
61 <collection name="output_shapes" type="list" label="${tool.name} (shapes) on ${on_string}"> | 64 <collection name="output_shapes" type="list" label="${tool.name} (shapes) on ${on_string}"> |
62 <discover_datasets pattern="__name__" directory="output_png_dir" format="png" /> | 65 <discover_datasets pattern="__name__" directory="output_png_dir" format="png"/> |
63 <filter>input_type_cond['input_type'] == 'images'</filter> | 66 <filter>input_type_cond['input_type'] == 'images'</filter> |
64 </collection> | 67 </collection> |
65 </outputs> | 68 </outputs> |
66 <tests> | 69 <tests> |
67 <test> | 70 <test> |
71 <test> | |
72 <param name="input" value="person_small.jpg" ftype="jpg"/> | |
73 <output name="output_shape_confidence" file="output_shape_confidence.txt" ftype="txt" compare="contains"/> | |
74 <output name="output_shape" file="output_shape1.jpg" ftype="jpg"/> | |
75 </test> | |
68 </test> | 76 </test> |
69 </tests> | 77 </tests> |
70 <help> | 78 <help> |
71 **What it does** | 79 **What it does** |
72 | 80 |