Mercurial > repos > bgruening > doclayoutyolo
comparison doclayoutyolo.xml @ 0:28b4dc80d58b draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/image_processing/yolo-utils/doclayoutyolo commit 80167f52fb9bd60b57e4df9d68152876171228d6
| author | bgruening |
|---|---|
| date | Fri, 13 Jun 2025 14:54:15 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:28b4dc80d58b |
|---|---|
| 1 <tool id="doclayoutyolo" name="DocLayout-YOLO" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description>Enhancing document layout analysis</description> | |
| 3 <macros> | |
| 4 <token name="@TOOL_VERSION@">0.0.4.1</token> | |
| 5 <token name="@VERSION_SUFFIX@">0</token> | |
| 6 <token name="@PROFILE@">24.2</token> | |
| 7 </macros> | |
| 8 <creator> | |
| 9 <organization name="European Galaxy Team" url="https://galaxyproject.org/eu/"/> | |
| 10 <person givenName="Anup" familyName="Kumar" email="kumara@informatik.uni-freiburg.de"/> | |
| 11 </creator> | |
| 12 <requirements> | |
| 13 <container type="docker">quay.io/galaxy/doclayout-yolo:@TOOL_VERSION@</container> | |
| 14 </requirements> | |
| 15 <required_files> | |
| 16 <include path="segment_text_yolo.py"/> | |
| 17 </required_files> | |
| 18 <command detect_errors="aggressive"><![CDATA[ | |
| 19 python '$__tool_directory__/segment_text_yolo.py' | |
| 20 --yolo_model '$input_yolo_model' | |
| 21 --input_image '$input_image' | |
| 22 --input_image_ext '$input_image.ext' | |
| 23 --input_confidence '$input_confidence' | |
| 24 --input_image_size '$input_image_size' | |
| 25 --output_image '$output_image' | |
| 26 --output_geojson '$output_segmentation_coordinates' | |
| 27 ]]> | |
| 28 </command> | |
| 29 <inputs> | |
| 30 <param name="input_yolo_model" type="data" format="zip" label="Yolo model" help="Please upload a Yolo model."/> | |
| 31 <param name="input_image" type="data" format="tiff,jpg,png" label="Input image" help="Please provide an input image for the analysis."/> | |
| 32 <param name="input_confidence" type="float" label="Confidence" value="0.5" min="0.0" max="1.0" help="Set confidence threshold between 0.0 and 1.0 for drawing bounding boxes. Higher values indicate higher probablity of segmentation."/> | |
| 33 <param name="input_image_size" type="integer" label="Image size" value="1024" min="1" max="1500" help="Set input image size for image resize by Doclayout Yolo model. Larger values may provide better accuracy in segmentation but could be slower. Lower values might be faster with lower accuracy."/> | |
| 34 </inputs> | |
| 35 <outputs> | |
| 36 <data format_source="input_image" name="output_image" label="Segmented image"></data> | |
| 37 <data format="geojson" name="output_segmentation_coordinates" label="Segmented coordinates"></data> | |
| 38 </outputs> | |
| 39 <tests> | |
| 40 <test> | |
| 41 <param name="input_yolo_model" value="input_yolo_model.zip" location="https://huggingface.co/juliozhao/DocLayout-YOLO-DocLayNet-Docsynth300K_pretrained/resolve/main/doclayout_yolo_doclaynet_imgsz1120_docsynth_pretrain.pt?download=true"/> | |
| 42 <param name="input_image" value="input_image_png.png"/> | |
| 43 <param name="input_confidence" value="0.5"/> | |
| 44 <param name="input_image_size" value="1024"/> | |
| 45 <output name="output_image" ftype="png"> | |
| 46 <assert_contents> | |
| 47 <has_size size="920950" delta="100" /> | |
| 48 </assert_contents> | |
| 49 </output> | |
| 50 <output name="output_segmentation_coordinates" ftype="geojson"> | |
| 51 <assert_contents> | |
| 52 <has_text text="Polygon" /> | |
| 53 <has_text text="Feature" /> | |
| 54 <has_text text="coordinates" /> | |
| 55 </assert_contents> | |
| 56 </output> | |
| 57 </test> | |
| 58 <test> | |
| 59 <param name="input_yolo_model" value="input_yolo_model.zip" location="https://huggingface.co/juliozhao/DocLayout-YOLO-DocLayNet-Docsynth300K_pretrained/resolve/main/doclayout_yolo_doclaynet_imgsz1120_docsynth_pretrain.pt?download=true"/> | |
| 60 <param name="input_image" value="input_image_jpg.jpg" location="https://zenodo.org/records/15649779/files/input_image_jpg.jpg?download=1"/> | |
| 61 <param name="input_confidence" value="0.5"/> | |
| 62 <param name="input_image_size" value="1024"/> | |
| 63 <output name="output_image" ftype="jpg"> | |
| 64 <assert_contents> | |
| 65 <has_size size="2753175" delta="100" /> | |
| 66 </assert_contents> | |
| 67 </output> | |
| 68 <output name="output_segmentation_coordinates" ftype="geojson"> | |
| 69 <assert_contents> | |
| 70 <has_text text="Polygon" /> | |
| 71 <has_text text="Feature" /> | |
| 72 <has_text text="coordinates" /> | |
| 73 </assert_contents> | |
| 74 </output> | |
| 75 </test> | |
| 76 <test> | |
| 77 <param name="input_yolo_model" value="input_yolo_model.zip" location="https://huggingface.co/juliozhao/DocLayout-YOLO-DocLayNet-Docsynth300K_pretrained/resolve/main/doclayout_yolo_doclaynet_imgsz1120_docsynth_pretrain.pt?download=true"/> | |
| 78 <param name="input_image" value="input_image_tiff.tif"/> | |
| 79 <param name="input_confidence" value="0.5"/> | |
| 80 <param name="input_image_size" value="1024"/> | |
| 81 <output name="output_image" ftype="tiff"> | |
| 82 <assert_contents> | |
| 83 <has_size size="510756" delta="100" /> | |
| 84 </assert_contents> | |
| 85 </output> | |
| 86 <output name="output_segmentation_coordinates" ftype="geojson"> | |
| 87 <assert_contents> | |
| 88 <has_text text="Polygon" /> | |
| 89 <has_text text="Feature" /> | |
| 90 <has_text text="coordinates" /> | |
| 91 </assert_contents> | |
| 92 </output> | |
| 93 </test> | |
| 94 </tests> | |
| 95 <help> | |
| 96 <![CDATA[ | |
| 97 **What it does** | |
| 98 | |
| 99 The tool takes a Yolo model trained for annotating bounding boxes around text. It takes a pretrained Yolo model and predicts bounding boxes in the input image where any text is found. | |
| 100 It is based on document layout analysis: https://github.com/opendatalab/DocLayout-YOLO. The Yolo model can be downloaded from: https://huggingface.co/juliozhao/DocLayout-YOLO-DocLayNet-Docsynth300K_pretrained/tree/main | |
| 101 | |
| 102 | |
| 103 **Input files** | |
| 104 - Yolo model (as `.pt` file) | |
| 105 - Input image containing text | |
| 106 - Confidence score to be used for drawing bounding boxes | |
| 107 - Image size to be resized to by Yolo model | |
| 108 | |
| 109 **Output files** | |
| 110 - Segmented image | |
| 111 - Coordinates of bounding boxes as Geojson file | |
| 112 | |
| 113 ]]> | |
| 114 </help> | |
| 115 <citations> | |
| 116 <citation type="bibtex"> | |
| 117 @ARTICLE{zhao2024doclayoutyoloenhancingdocumentlayout, | |
| 118 Author = {Zhao, Zhiyuan and et al.}, | |
| 119 title = {{DocLayout-YOLO: Enhancing Document Layout Analysis through Diverse Synthetic Data and Global-to-Local Adaptive Perception}}, | |
| 120 url = {https://github.com/opendatalab/DocLayout-YOLO} | |
| 121 } | |
| 122 </citation> | |
| 123 </citations> | |
| 124 </tool> |
