FishID Studio
ConvNeXt-Tiny Pelagic Fish Classifier
2 min readupdated
A fine-tuned ConvNeXt-Tiny model (pretrained on ImageNet) designed to automatically identify 10 species of large migratory pelagic fish from photos and video frames. Created by author viniciusjose as part of the open FishID Studio platform for electronic fishery monitoring, fish counting, and length estimation. Unlike general image classifiers, it is tailored specifically for commercial and oceanic species, outputting probabilities for each one. The solution is useful for marine researchers, environmentalists, and developers building video analytics systems for commercial fishing.
Key features
- Recognition of 10 fish species: mahi-mahi, sailfish, white and blue marlin, shortbill spearfish, swordfish, and four tuna species (skipjack, albacore, yellowfin, and bigeye).
- Base architecture built on ConvNeXt-Tiny, trained using TensorFlow / Keras 3 with mixed_float16, CosineDecay, and MixUp.
- Dataset containing over 6,200 images gathered from open databases like iNaturalist and FishBase.
- Weights released under a non-commercial CC BY-NC 4.0 license (source code of the platform is under MIT).
What you can do
- Integrate the classifier into a Python script or electronic monitoring (EM) service to process video streams from fishing vessels.
- Use it in scientific and educational projects to automatically sort photo archives from marine expeditions.
- Explore the developer-provided reproducible notebook to adapt the Keras 3 training pipeline for your own classification tasks.
Example
import cv2, keras, numpy as np
from huggingface_hub import hf_hub_download
model = keras.models.load_model(
hf_hub_download("viniciusjose/fishid-convnext-tiny", "modelo.keras"), compile=False
)
_, H, W, _ = model.input_shape
probs = model(img[None].astype("float32") / 255.0, training=False).numpy()[0]Read more
DetailsData: 6,200+ images across 10 classes (model outputs sorted alphabetically by scientific names).
Inference: images are resized maintaining proportions, padded with black borders to (H, W) and normalized to [0, 1]; test-time augmentation is applied.
Limitations: drops in accuracy during night scenes, occlusions, and partial visibility; out-of-list species are still forced into one of the 10 classes.
Important: not intended for official taxonomic certification or regulatory decisions without human verification.










Comments