comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:252fd085940d
1 <tool id="json2yolosegment" name="Convert AnyLabeling JSON to YOLO text" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2">
2 <description>with ultralytics</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="creator" />
7 <expand macro="edam" />
8 <command detect_errors="aggressive">
9 <![CDATA[
10 mkdir ./input ./output &&
11
12 #for $filename in $in_json:
13 ln -s '$filename' './input/${filename.element_identifier}' &&
14 #end for
15
16 python '$__tool_directory__/json2yolosegment.py' -i ./input/ -o ./output -c '$class_name'
17
18 ]]>
19 </command>
20 <inputs>
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."/>
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."/>
23 </inputs>
24 <outputs>
25 <collection name="output_yolo" type="list" label="YOLO text files">
26 <discover_datasets pattern="(?P&lt;name&gt;.+)\.txt" visible="true" directory="./output" format="txt"/>
27 </collection>
28 </outputs>
29 <tests>
30 <test>
31 <param name="in_json" value="in_json.json,in_json1.json" />
32 <param name="class_name" value="class_names.txt" />
33 <output_collection name="output_yolo">
34 <element name="in_json">
35 <assert_contents>
36 <has_n_lines n="1" />
37 <has_text text="0.8532289628180039" />
38 </assert_contents>
39 </element>
40 <element name="in_json1">
41 <assert_contents>
42 <has_n_lines n="1" />
43 <has_text text="0.7710371819960861" />
44 </assert_contents>
45 </element>
46 </output_collection>
47 </test>
48 </tests>
49 <help>
50 <![CDATA[
51 **What it does**
52 This tool converts label files generated by AnyLabeling into YOLO supported text files.
53 ]]>
54 </help>
55 <expand macro="citations" />
56 </tool>