Mercurial > repos > bgruening > json2yolosegment
annotate json2yolosegment.xml @ 4:f6990d85161c draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
author | bgruening |
---|---|
date | Mon, 21 Jul 2025 15:51:13 +0000 |
parents | dfda27273ead |
children |
rev | line source |
---|---|
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
1 <tool id="json2yolosegment" name="Convert AnyLabeling JSON to YOLO text" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
2 <description>with ultralytics</description> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
3 <macros> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
4 <import>macros.xml</import> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
5 </macros> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
6 <expand macro="creator" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
7 <expand macro="edam" /> |
1
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
8 <expand macro="requirements" /> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
9 <command detect_errors="aggressive"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
10 <![CDATA[ |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
11 mkdir ./input ./output && |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
12 |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
13 #for $filename in $in_json: |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
14 #if $filename.element_identifier.endswith($filename.ext) |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
15 ln -s '$filename' './input/${filename.element_identifier}' && |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
16 #else: |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
17 ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}' && |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
18 #end if |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
19 #end for |
1
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
20 |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
21 python '$__tool_directory__/json2yolosegment.py' |
1
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
22 -i ./input/ |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
23 -o ./output |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
24 -c '$class_name' |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
25 |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
26 ]]> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
27 </command> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
28 <inputs> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
29 <param name="in_json" type="data" format="json" multiple="true" label="Input label files" help="The label file is the output of AnyLabeling in JSON format."/> |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
30 <param name="class_name" type="data" format="txt" label="Class file" help="Class names text file, contains the names of classes, one class per row."/> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
31 </inputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
32 <outputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
33 <collection name="output_yolo" type="list" label="YOLO text files"> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
34 <discover_datasets pattern="(?P<designation>.+)\.txt" directory="./output" format="txt"/> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
35 </collection> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
36 </outputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
37 <tests> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
38 <test> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
39 <param name="in_json" value="in_json.json,in_json1.json" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
40 <param name="class_name" value="class_names.txt" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
41 <output_collection name="output_yolo"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
42 <element name="in_json"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
43 <assert_contents> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
44 <has_n_lines n="1" /> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
45 <has_text text="0.8532289628180039" /> |
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
46 </assert_contents> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
47 </element> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
48 <element name="in_json1"> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
49 <assert_contents> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
50 <has_n_lines n="1" /> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
51 <has_text text="0.7710371819960861" /> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
52 </assert_contents> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
53 </element> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
54 </output_collection> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
55 </test> |
1
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
56 <test> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
57 <param name="in_json" value="in_json_noext,in_json1_noext" /> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
58 <param name="class_name" value="class_names.txt" /> |
4
f6990d85161c
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
bgruening
parents:
1
diff
changeset
|
59 <output_collection name="output_yolo"> |
1
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
60 <element name="in_json1_noext"> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
61 <assert_contents> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
62 <has_n_lines n="1" /> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
63 <has_text text="0.7710371819960861" /> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
64 </assert_contents> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
65 </element> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
66 <element name="in_json_noext"> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
67 <assert_contents> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
68 <has_n_lines n="1" /> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
69 <has_text text="0.8532289628180039" /> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
70 </assert_contents> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
71 </element> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
72 </output_collection> |
dfda27273ead
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 9685f843a52451b3416416094cc0e740f8825dcc
bgruening
parents:
0
diff
changeset
|
73 </test> |
0
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
74 </tests> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
75 <help> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
76 <![CDATA[ |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
77 **What it does** |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
78 This tool converts label files generated by AnyLabeling into YOLO supported text files. |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
79 ]]> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
80 </help> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
81 <expand macro="citations" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
82 </tool> |