-
Notifications
You must be signed in to change notification settings - Fork 1k
Yolo_predict_tutorial_deepsea #6258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 33 commits
01b2f0e
37d1a8b
c40eabb
868b9dc
a95ce4d
3547180
498fe12
c9083d0
95c963b
52c1afa
f31775f
1b574c7
29cd75c
82bd6f6
7654df9
1598632
498bdc9
c492ec3
ac664b7
f236611
b175b99
7e9fc1b
a2b025e
589d0eb
3b22986
931ca71
bc8252d
b0f73b0
6d0ef7a
3badbb6
d7efb00
b2b838e
de8b832
0ad22ca
596b41b
8b8d8d0
d406090
21b0186
a0d343c
10eb70d
d6cadcf
a3a8957
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @online{lebeaud2024deepsea, | ||
| author = {Lebeaud, Antoine and Tosello, Vanessa and Borremans, Catherine and Matabos, Marjolaine}, | ||
| title = {Deep-sea observatories images labeled by citizen for object detection algorithms}, | ||
| year = {2024}, | ||
| publisher = {SEANOE}, | ||
| doi = {10.17882/101899}, | ||
| url = {https://www.seanoe.org/data/00907/101899} | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,286 @@ | ||||||
| --- | ||||||
| layout: tutorial_hands_on | ||||||
| title: Object detection and segmentation with YOLO | ||||||
|
|
||||||
| zenodo_link: '' | ||||||
|
|
||||||
| questions: | ||||||
| - How do object detection and segmentation differ in practice? | ||||||
| - How can I run YOLO models on marine images to detect species using Galaxy? | ||||||
| - Why does the choice of model type matter? | ||||||
|
|
||||||
| objectives: | ||||||
| - Detect marine species in underwater images using a pretrained YOLOv8 model | ||||||
| - Compare results between detection and segmentation modes | ||||||
| - Understand the requirements and output types of each model | ||||||
|
|
||||||
| time_estimation: "45m" | ||||||
|
|
||||||
| tags: | ||||||
| - object-detection | ||||||
| - image-segmentation | ||||||
| - deep-learning | ||||||
| - ecology | ||||||
|
|
||||||
| bibtex: tutorial.bib | ||||||
|
|
||||||
| priority: 5 | ||||||
|
|
||||||
| contributions: | ||||||
| authorship: | ||||||
| - mjoudy | ||||||
| - yvanlebras | ||||||
|
|
||||||
| follow_up_training: | ||||||
| - type: "internal" | ||||||
| topic_name: machine-learning | ||||||
| tutorials: | ||||||
| - ml-advanced-image | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) |
||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| YOLO (You Only Look Once) is a fast, deep learning-based algorithm for real-time object detection. It predicts object classes and bounding boxes in a single pass over the image. YOLOv8 is a specific version, offering improved accuracy and speed. | ||||||
|
|
||||||
| In this tutorial, you will use Galaxy to run two types of YOLOv8 models: | ||||||
|
|
||||||
| 1. **Object Detection** using real underwater images from the SEANOE dataset. | ||||||
| 2. **Segmentation** using an Ultralytics demo model on a standard image. | ||||||
|
|
||||||
| We'll compare both modes and discuss what kind of output they generate and why it matters in bioimage analysis. | ||||||
mjoudy marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| # Part 1: Detection of marine species | ||||||
|
|
||||||
| ## 🔗 Dataset | ||||||
|
|
||||||
| 👉 We will use selected images from the SEANOE dataset {% cite lebeaud2024deepsea %}. | ||||||
|
|
||||||
| The [SEANOE](https://www.seanoe.org/data/00907/101899) collection features real underwater images captured by deep‑sea observatories as part of a citizen science initiative called Deep Sea Spy. These non‑destructive imaging stations continuously monitor marine ecosystems and provide snapshots of various fauna. In this dataset, multiple annotators—including trained scientists and enthusiastic citizen scientists—have manually labeled images with polygons, lines, or points highlighting marine organisms. These annotations were then cleaned and converted into bounding boxes to create a training-ready dataset for object detection with YOLOv8. Though the exact species vary, images often include deep-sea fish, species, making this dataset well-suited for practicing detection tasks. | ||||||
|
|
||||||
| <img src="../../images/yolo/CAM-TEMPO.jpg" style="width:40%; display:inline-block;" alt="sample buccinid data"> | ||||||
| <img src="../../images/yolo/MOMAR.jpg" style="width:40%; display:inline-block;" alt="sample bythongraede data"> | ||||||
| <img src="../../images/yolo/CAM-TEMPO2.jpg" style="width:40%; display:inline-block;" alt="sample buccinid2 data"> | ||||||
| <img src="../../images/yolo/CAM-TEMPO3.jpg" style="width:40%; display:inline-block;" alt="sample buccinid3 data"> | ||||||
|
|
||||||
| ## Get data | ||||||
|
|
||||||
| > <hands-on-title> Data Upload </hands-on-title> | ||||||
| > | ||||||
| > 1. Create a new history for this tutorial and give it a name (example: “DeepSeaSpy Yolo tutorial”) for you to find it again later if needed. | ||||||
| > | ||||||
| > {% snippet faqs/galaxy/histories_create_new.md %} | ||||||
| > | ||||||
| > {% snippet faqs/galaxy/histories_rename.md %} | ||||||
| > | ||||||
| > 2. Import image data files and models from [SEANOE marine datawarehouse](https://www.seanoe.org/data/00907/101899/). | ||||||
| > | ||||||
| > DeepSeaSpy image data files and models as a zip file: | ||||||
| > ``` | ||||||
| > https://www.seanoe.org/data/00907/101899/data/115473.zip | ||||||
| > ``` | ||||||
| > | ||||||
| > {% snippet faqs/galaxy/datasets_import_via_link.md %} | ||||||
| > | ||||||
| > 3. Use {% tool [Unzip](toolshed.g2.bx.psu.edu/repos/imgteam/unzip/unzip/6.0+galaxy0) %} to create a data collection in your history where all archive files will be unzipped. | ||||||
| > | ||||||
| > 4. Unhide the models data files. | ||||||
| > | ||||||
| > History search `name:detection deleted:false visible:any` then unhidde the 2 model files "dataset_seanoe_101899_YOLOv8-weights-for-Bythograeidae-detection" and "dataset_seanoe_101899_YOLOv8-weights-for-Buccinidae-detection". | ||||||
mjoudy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mjoudy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| > | ||||||
| > | ||||||
| > {% snippet faqs/galaxy/datasets_unhidden.md %} | ||||||
| > | ||||||
| > {% snippet faqs/galaxy/datasets_change_datatype.md datatype="tabular" %} | ||||||
| > | ||||||
| > 5. Select a sample of 100 image files and create a dedicated data collection | ||||||
| > | ||||||
| > History search `extension:jpg deleted:false visible:any` then click on "select all" and "autobuild list", select 100 files and give a name of the data collection, "DeepSeaSpy 100 images sample" for example. Tips: To select only last 100 files, you can use the history search function and specify `extension:jpg deleted:false hid>XXXX visible:any` in the search bar where XXXX is the id of the last image dataset minus 100 (for example `extension:jpg deleted:false hid>3886 visible:any` if you have images until the history dataset ID 3986. | ||||||
mjoudy marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
kostrykin marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| > | ||||||
| > 6. Create class name file "Buccinide", copying and pasting this content in the file uploader: | ||||||
| > | ||||||
| > ``` | ||||||
| > Autre poisson | ||||||
| > Couverture de moules | ||||||
| > Couverture microbienne | ||||||
| > Couverture vers tubicole | ||||||
| > Crabe araignée | ||||||
| > Crabe bythograeidé | ||||||
|
||||||
| > Crabe bythograeidé | |
| > Crabe bythograeide |
so that the reader won't be suggested to use some characters that are not supported by the tool? (see this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took these class names from the pre-trained model (.pt file) available in the dataset. I think if they are going to use this model, they have to provide these names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maybe give it a shot and see whether it works? My gut feeling is that it does…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I had tested. but will do it again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjoudy Any updates on this yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to try it myself, but I can't find the image used as input to obtain topics/imaging/images/yolo/bythog2.jpeg. Can you @mjoudy maybe please point me to the right file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see in the screenshot the model is trained with this name with special character. Form the link in the tutorial you can download the model and images. The first model has this character. In the second model, although there are "é" for multiple times, there is no problem with printing it.
This is also the case when you test it using galaxy tool. you can try it with any random image of the dataset which has this specie.
Uh oh!
There was an error while loading. Please reload this page.