Skip to content

Conversation

@mjoudy
Copy link

@mjoudy mjoudy commented Jul 16, 2025

Hi all,

This is a tutorial for yolo prediction tool based on deepsea seanoe dataset. Please kindly give your feedback.

@mjoudy mjoudy marked this pull request as ready for review July 16, 2025 19:42
@anuprulez anuprulez self-requested a review July 18, 2025 08:05
Copy link
Collaborator

@kostrykin kostrykin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some comments inside.

@yvanlebras
Copy link
Collaborator

Hi Mohammad. I added previously added content from the older PR (sorry, I was not seeing there was 2 identicial PR...) proposing a format more linked with GTN material with hands-on, comment tip and warning. I also propose to be co-author and to propose this tutorial in both Imaging and Ecology GTN sections (if this seems ok for you @shiltemann @bebatut @hexylena ).

Plaese, don't hesitate to modify / comment / revert !

Comment on lines 137 to 140
> > - `Image size`: Use 1000 (or a smaller number like 640 if processing speed is important). This controls how much the image is resized before prediction. Smaller values = faster but possibly less accurate.
> > - `Confidence threshold`: Set to 0.25 (25%). This controls how confident the model must be to report a detection. If you increase this value (e.g., 0.5), you’ll get fewer detections, but they’ll be more confident. If you lower it (e.g., 0.1), you may get more results, but possibly more false positives.
> > - `IoU threshold`: Set to 0.45. This is used for Non-Maximum Suppression (NMS), which removes overlapping detections. A higher IoU value (e.g., 0.7) keeps more overlapping boxes. A lower IoU (e.g., 0.3) removes more overlaps, which may help clean up crowded images.
> > - `Max detections`: Set a reasonable cap like 300. This limits the number of objects detected per image.
Copy link
Collaborator

@kostrykin kostrykin Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider adapting the formatting of the parameters to the format used in lines 113–118.

Copy link
Contributor

@sunyi000 sunyi000 Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the image size, if we make prediction on an image with 512x512, setting image size to 1000 will probably not work? im not too sure..better to test it

Copy link
Contributor

@sunyi000 sunyi000 Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, i think yolo automatically adjust the size, if input 1000, yolo will change it to 1024, 500 will become 512.
maybe we need to add this to the image size explaination? we need to test it, to be safe.. i remember i had some issue with setting size bigger than the image..

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point @sunyi000 I think its correct. I will test it and add this point to the tutorial.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sunyi000 I tested this issue and there is no problem. my images size are 1920by1080 and in the tool I tested for 640, 1000, 2000, 3000. They all had correct outputs.

@anuprulez
Copy link
Member

@yvanlebras I agree. We can have this tutorial for both - Ecology and BioImaging. Actually, i was talking to @sunyi000 two days back and he suggested the same. He plans to work on a new tutorial for Yolo training tool. @mjoudy can you use images from BioImage model zoo (https://bioimage.io/#/models) to make prediction using Yolo models? Some sample images you can find in this tutorial: https://training.galaxyproject.org/training-material/topics/imaging/tutorials/process-image-bioimageio/tutorial.html

@anuprulez
Copy link
Member

@yvanlebras @kostrykin thank you very much for your work on this. @mjoudy please address the issues mentioned

@yvanlebras
Copy link
Collaborator

For SEANOE data part, I can also add some steps further to take all txt files to produce a summary of number of each species detected if relevant / of interest.

@mjoudy
Copy link
Author

mjoudy commented Jul 23, 2025

Hi Mohammad. I added previously added content from the older PR (sorry, I was not seeing there was 2 identicial PR...) proposing a format more linked with GTN material with hands-on, comment tip and warning. I also propose to be co-author and to propose this tutorial in both Imaging and Ecology GTN sections (if this seems ok for you @shiltemann @bebatut @hexylena ).

Plaese, don't hesitate to modify / comment / revert !

Thanks Yvan. sorry I had made a mistake and opened two PR. after a while I closed one of them.
Thank you for your suggestions and help.

@mjoudy
Copy link
Author

mjoudy commented Jul 23, 2025

@yvanlebras I agree. We can have this tutorial for both - Ecology and BioImaging. Actually, i was talking to @sunyi000 two days back and he suggested the same. He plans to work on a new tutorial for Yolo training tool. @mjoudy can you use images from BioImage model zoo (https://bioimage.io/#/models) to make prediction using Yolo models? Some sample images you can find in this tutorial: https://training.galaxyproject.org/training-material/topics/imaging/tutorials/process-image-bioimageio/tutorial.html

Thank you Anup for suggestions. Actually, as far as I know, images and models in the BioImage zoo are not yolo-based. Please let me know if there are any. Currently, I am looking for some bio-inspired yolo pre-trained models to make a better example for the segmentation part.

@mjoudy
Copy link
Author

mjoudy commented Jul 31, 2025

I have added a few comments. I am trying to use this tutorial and these are my observations.

We should make the datasets access easier. For the tutorial, if we include a few images, that would be enough to show the usage of the tool. Currently we are pulling a large set of around 4000 images. We can point users to the original large repository. I think these sample images and trained model files should also come from Zenodo. In the current form, it is not easy to find the used datasets. Please me know your opinions @yvanlebras @kostrykin @mjoudy . Thanks

Thanks for the suggestion. I will make a sample and provide its zenodo link.

@anuprulez
Copy link
Member

Hi @yvanlebras, can we update the input datasets to include just a few images and take them from Zenodo? Then we will have the opportunity to simplify the history operations a lot that we have in the tutorial? Thanks a lot!

@galaxyproject galaxyproject deleted a comment from github-actions bot Aug 11, 2025
Copy link
Collaborator

@kostrykin kostrykin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the linting issue…

Copy link
Collaborator

@kostrykin kostrykin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yvanlebras
Copy link
Collaborator

Hi everyone. Really sorry to come back just now on this PR! I created a new history to try on "just" 2 input images https://usegalaxy.eu/u/ylebras/h/yolo-training-on-just-2-images so we can put these files in Zenodo for a more easier to follow and use tutorial! Will try to create the GTN Zenodo repo, and / or Arthur will continue and finish this tutorial!
When I was tested, I saw that the last version of the tool, v4, is not workinf properly apparently (see error datasert on previously mentionned history)...

Copy link
Member

@shiltemann shiltemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mjoudy! I just pushed some changes to address the linting errors.

Thanks @yvanlebras and @kostrykin for reviewing testing and improving this

affiliations:
- deKCD

mjoudy:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mjoudy I added you to the CONTRIBUTORS.yaml file, feel free to add more info here about yourself (affiliation, socials, orcid, etc)

- type: "internal"
topic_name: machine-learning
tutorials:
- ml-advanced-image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which tutorial are you trying to refer to here? this should match the folder name the tutorial is in (same for the topic)

YOLOv8 in segment mode produces a more detailed output than detection:
**Segmented overlay (*.jpg):**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [GTN Lint] <GTN:020> reported by reviewdog 🐶
This looks like a heading, but isn't. Please use proper semantic headings where possible. You should check the heading level of this suggestion, rather than accepting the change as-is.

Suggested change
**Segmented overlay (*.jpg):**
**### Segmented overlay (*.jpg):**

<img src="../../images/yolo/bus.jpg" style="width:40%;" alt="Input image of a bus used in segmentation example">
**Mask file (*_mask.tiff):**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [GTN Lint] <GTN:020> reported by reviewdog 🐶
This looks like a heading, but isn't. Please use proper semantic headings where possible. You should check the heading level of this suggestion, rather than accepting the change as-is.

Suggested change
**Mask file (*_mask.tiff):**
**### Mask file (*_mask.tiff):**

<img src="../../images/yolo/bus_mask.png" style="width:40%;" alt="YOLOv8 predicted mask on the bus image">
**Annotation file (*.txt):**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [GTN Lint] <GTN:020> reported by reviewdog 🐶
This looks like a heading, but isn't. Please use proper semantic headings where possible. You should check the heading level of this suggestion, rather than accepting the change as-is.

Suggested change
**Annotation file (*.txt):**
**### Annotation file (*.txt):**

@kostrykin
Copy link
Collaborator

Hi everyone. Really sorry to come back just now on this PR! I created a new history to try on "just" 2 input images https://usegalaxy.eu/u/ylebras/h/yolo-training-on-just-2-images so we can put these files in Zenodo for a more easier to follow and use tutorial! Will try to create the GTN Zenodo repo, and / or Arthur will continue and finish this tutorial! When I was tested, I saw that the last version of the tool, v4, is not workinf properly apparently (see error datasert on previously mentionned history)...

The error is with the toolshed.g2.bx.psu.edu/repos/bgruening/yolo_predict/yolo_predict/8.3.0+galaxy4 tool, @sunyi000 can you maybe help with this?

@sunyi000
Copy link
Contributor

Hi everyone. Really sorry to come back just now on this PR! I created a new history to try on "just" 2 input images https://usegalaxy.eu/u/ylebras/h/yolo-training-on-just-2-images so we can put these files in Zenodo for a more easier to follow and use tutorial! Will try to create the GTN Zenodo repo, and / or Arthur will continue and finish this tutorial! When I was tested, I saw that the last version of the tool, v4, is not workinf properly apparently (see error datasert on previously mentionned history)...

The error is with the toolshed.g2.bx.psu.edu/repos/bgruening/yolo_predict/yolo_predict/8.3.0+galaxy4 tool, @sunyi000 can you maybe help with this?

from the output in history, looks like a detection model is used for segmentation tasks, so the masks are None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants