Downloads · 30 days
0
imageomics/butterfly_segmentation_unet
butterfly_segmentation_unet is a machine learning model from imageomics. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model takes in an image of a butterfly (with or without body attached to wings) and segments out any existing hindwings and forewings, in addition to pictured equipment described below.
Downloads · 30 days
0
Access
Public
Updated Oct 2, 2025
Repo size
70.5 MB
Likes
0
Public
Click a slice to open those files.
.hdf547 MB · 100%
From the Hugging Face model README
This model takes in an image of a butterfly (with or without body attached to wings) and segments out any existing hindwings and forewings, in addition to pictured equipment described below.
unet_butterflies_256_256.hdf5 is the butterfly segmentation model.
The segmentation model was trained on a dataset of 800 total images from the Jiggins, OM_STRI, and Monteiro datasets. The model architecture is based on a simple UNet architecture for multiclass classification.
Keras implementation of Butterfly UNet segmentation model. The model is responsible for taking an input image (256 x 256 x 3) and generating segmentation masks for all classes below that are found in the image. Vertical flips were applied as data augmentations prior to training the model. Images are converted to grayscale before being fed into the model. The model is trained with categorical cross entropy loss.
[pixel class] corresponding category
The model was fed class weights to help improve performance on wing segmentation categories (pixel classes: 2,3,4,5). The class weights dictionary used is:
{0: 1.0, 1: 1.0, 2: 3.0, 3: 3.0, 4: 3.0, 5: 3.0, 6: 1.0, 7: 1.0, 8: 1.0, 9: 1.0, 10: 1.0}
Developed by: Michelle Ramirez
To view applications of how to load in the model file and predict masks on images, please refer to this github repository