Mercurial > repos > bgruening > json2yolosegment
annotate json2yolosegment.xml @ 0:252fd085940d draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
author | bgruening |
---|---|
date | Fri, 13 Jun 2025 11:23:35 +0000 |
parents | |
children | dfda27273ead |
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" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
8 <command detect_errors="aggressive"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
9 <![CDATA[ |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
10 mkdir ./input ./output && |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
11 |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
12 #for $filename in $in_json: |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
13 ln -s '$filename' './input/${filename.element_identifier}' && |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
14 #end for |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
15 |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
16 python '$__tool_directory__/json2yolosegment.py' -i ./input/ -o ./output -c '$class_name' |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
17 |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
18 ]]> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
19 </command> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
20 <inputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
21 <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."/> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
22 <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."/> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
23 </inputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
24 <outputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
25 <collection name="output_yolo" type="list" label="YOLO text files"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
26 <discover_datasets pattern="(?P<name>.+)\.txt" visible="true" directory="./output" format="txt"/> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
27 </collection> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
28 </outputs> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
29 <tests> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
30 <test> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
31 <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
|
32 <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
|
33 <output_collection name="output_yolo"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
34 <element name="in_json"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
35 <assert_contents> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
36 <has_n_lines n="1" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
37 <has_text text="0.8532289628180039" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
38 </assert_contents> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
39 </element> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
40 <element name="in_json1"> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
41 <assert_contents> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
42 <has_n_lines n="1" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
43 <has_text text="0.7710371819960861" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
44 </assert_contents> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
45 </element> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
46 </output_collection> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
47 </test> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
48 </tests> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
49 <help> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
50 <![CDATA[ |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
51 **What it does** |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
52 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
|
53 ]]> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
54 </help> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
55 <expand macro="citations" /> |
252fd085940d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit 67e0e1d123bcfffb10bab8cc04ae67259caec557
bgruening
parents:
diff
changeset
|
56 </tool> |