Request for Bulk Patch Download Assistance

28 views
Skip to first unread message

Abigail Mwalimu

unread,
Feb 20, 2025, 8:10:32 AM2/20/25
to coralne...@googlegroups.com, Swaleh Aboud
Dear CoralNet Support Team,

I hope this message finds you well. I’ve been a long-time user of CoralNet and have been working with the WIO source which contains thousands of labeled patches across numerous classes, each organized conceptually into different "folders" by label. I’m now looking to download all of these labeled patches in bulk, sorted by their respective labels, for further analysis.
Unfortunately, I haven’t found a native option in the interface to export patches in bulk, and manually downloading them or cropping from full images based on the CSV export is proving impractical given the scale (thousands of classes and patches). While I can script a solution using the annotation CSV and local images, I’d greatly prefer a more streamlined method if possible.
Could you please advise if there’s an existing feature, API endpoint, or custom export option that could facilitate downloading all labeled patches organized by class/label? If not, I’d appreciate any guidance or assistance you could offer for handling such a large dataset. My source ID is AbigailMwalimu, and I’d be happy to provide more details if needed.
Thank you for your time and support. I’ve really valued CoralNet’s capabilities over the years and appreciate any help you can provide!
Warm regards,
Abigail Mwalimu

Research Assistant | Coral Reef Programme
CORDIO East Africa,
#9 Kibaki Flats, Kenyatta Beach,
P.O. Box 10135 - 80101
Mombasa, Kenya


Skype: abigail.M

Prov 4:23: - Watch over your heart with all diligence, 
For from it flow the springs of life.

Stephen Chan

unread,
Feb 22, 2025, 4:17:45 PM2/22/25
to CoralNet Users
Hi Abigail,

Glad to hear CoralNet has been useful for you!
Unfortunately though, we don't have much that can help in terms of exporting patches in bulk. One possible solution is as you said - use the annotations CSV to get the point locations, and then re-crop the images yourself. To be honest, this is the way I would choose if I were doing it.

A second idea is to use a webpage-scraping script to go through Browse Patches and download those patches one page at a time. But this approach has two big downsides:
1) The patch order is actually re-randomized every time you advance a page, so if you scroll through all the available pages, you're bound to encounter some duplicates and will miss some unique patches. I've been meaning to change this behavior but never got around to it.
2) Scrolling through these pages of 20 patches each is going to be pretty slow. You'll have to wait several seconds for the patches to be generated on the server side as well, if they haven't been viewed in Browse Patches before.

Folks on this forum have occasionally posted useful scripts or walkthroughs for automating tasks like this - for example, there was one for downloading a source's images. I don't think I have seen a script for downloading/recreating a source's patches, though.
Reply all
Reply to author
Forward
0 new messages