0
|
1 <tool id="yolo" name="YOLO" version="1.0">
|
|
2 <description>real-time object detection</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.0">darknet</requirement>
|
|
5 </requirements>
|
|
6 <command detect_errors="exit_code"><![CDATA[
|
9
|
7 mkdir input_dir &&
|
|
8 mkdir output_dir &&
|
8
|
9 cp -R /home/greg/_conda/envs/__darknet@1.0/bin/* . &&
|
9
|
10 #for $index, $i in enumerate('$input'):
|
|
11 #set input_filename = $i.file_name
|
|
12 #set name = $i.name
|
11
|
13 #set output_filename = "%s_predictions.png" % str($index).zfill(5)
|
9
|
14 ln -s $input_filename input_dir/$name &&
|
|
15 darknet detect cfg/yolo.cfg yolo.weights 'input_dir/$name' -thresh $thresh 2> /dev/null &&
|
|
16 mv ./predictions.png output_dir/output_filename
|
|
17 #end for
|
0
|
18 ]]></command>
|
|
19 <inputs>
|
8
|
20 <param name="input" format="jpg" type="data_collection" collection_type="list" label="Collection of image files" />
|
6
|
21 <param name="thresh" type="float" value="0.25" label="Object detection threshold" />
|
0
|
22 </inputs>
|
|
23 <outputs>
|
8
|
24 <collection name="output" type="list">
|
9
|
25 <discover_datasets pattern="__name__" directory="output_dir" format="png" />
|
8
|
26 </collection>
|
0
|
27 </outputs>
|
|
28 <tests>
|
|
29 <test>
|
|
30 </test>
|
|
31 </tests>
|
|
32 <help>
|
|
33 **What it does**
|
|
34
|
|
35 You only look once (YOLO) is a state-of-the-art, real-time object detection system.
|
|
36
|
|
37 -----
|
|
38
|
|
39 **Options**
|
|
40
|
|
41 </help>
|
|
42 <citations>
|
|
43 <citation type="bibtex">
|
|
44 @misc{darknet13,
|
|
45 author = {Joseph Redmon},
|
|
46 title = {Darknet: Open Source Neural Networks in C},
|
|
47 url = {http://pjreddie.com/darknet/},
|
|
48 year = {2013--2016}}
|
|
49 </citation>
|
|
50 <citation type="bibtex">
|
|
51 @article{redmon2016yolo9000,
|
|
52 title={YOLO9000: Better, Faster, Stronger},
|
|
53 author={Redmon, Joseph and Farhadi, Ali},
|
|
54 journal={arXiv preprint arXiv:1612.08242},
|
|
55 year={2016}}
|
|
56 </citation>
|
|
57 </citations>
|
|
58 </tool>
|