The problem
Fisheries surveys, aquarium monitoring and biodiversity studies all start from the same slow manual step: looking at a photo and naming the fish — work that needs domain expertise and does not scale to large survey collections. Training a convolutional network from scratch on fish photos would demand a large labeled set, so this build uses transfer learning: the model starts from an ImageNet-pretrained backbone (a ResNet-style network) that already recognizes edges, textures and shapes, and only the species classifier head — plus a short full-network fine-tuning phase — is adapted to fish photos. The data comes from the QUT fish dataset / Fish4Knowledge collection (Anantharaman et al.), the standard academic reference for underwater fish recognition. A Flask demo wraps the trained model: upload a fish photo and get the top-3 predicted species with confidence scores. The training notebook logs validation accuracy and loss curves and computes a per-class confusion matrix during the build, so the report's metrics come from the run itself (design target ~85%+).
Single-fish photos (JPEG/PNG) from the QUT fish and Fish4Knowledge collection.
Follow the working sequence
How it works
Dataset & model:
Dataset name: QUT fish dataset / Fish4Knowledge collection (Anantharaman et al.) — the standard academic reference for underwater fish recognition. Source: the public academic release. Task: image classification (fine-grained, single-fish photos). Classes: the freshwater species labels in the dataset (the report documents the exact species list and the stratified train/validation split used in the build).
Model: transfer-learning CNN — an ImageNet pre-trained backbone (ResNet-style, He et al., CVPR 2016) with a fine-tuned species classifier head, trained in two phases (head first, then full-network fine-tuning).
Input: a single fish photo (JPEG/PNG), auto-preprocessed on upload. Prediction: softmax scores over the dataset's species. Output: top-3 predicted species with confidence scores.
Evaluation metrics: validation accuracy, accuracy/loss curves, and a per-class confusion matrix on the stratified validation split — all computed by the training notebook during the build. Design target: ~85%+ validation accuracy — a target for the training run, not a pre-claimed score.
Working:
- Dataset: fish photos from the QUT / Fish4Knowledge collection are loaded and split into stratified train and validation sets, preserving the species distribution in both.
- Preprocessing: training images are augmented with flips, crops and brightness/contrast jitter to simulate underwater imaging variation; validation images are center-cropped and normalized.
- Training phase: an ImageNet pre-trained backbone (ResNet-style) is trained in two phases — the species classifier head alone first, then full-network fine-tuning — with validation accuracy and loss logged each epoch.
- Evaluation phase: the best checkpoint is selected by validation accuracy; a per-class confusion matrix is computed on the stratified validation split during the build — the report's metrics come from this run, against the design target of ~85%+ validation accuracy.
- Inference phase (demo): the best .pth checkpoint is loaded by the Flask app at startup; each uploaded photo is preprocessed and passed through the network in a single forward pass.
- Output: softmax scores are ranked and the top-3 species are displayed with confidence bars; out-of-distribution fish receive the nearest-looking label, which the limitations document.
Specifications:
Model | Transfer-learning CNN — ImageNet pre-trained ResNet-style backbone, fine-tuned classifier head
Dataset | QUT fish dataset / Fish4Knowledge collection (Anantharaman et al.)
Classes | Freshwater fish species per the dataset labels; exact species list documented in the report
Split | Stratified train/validation split, documented in the report
Metric | Validation accuracy on the stratified split, computed during the build; design target ~85%+
Augmentation | Flips, crops, brightness/contrast jitter simulating underwater imaging variation
Input | Single fish photos (JPEG/PNG), auto-preprocessed on upload
Output | Top-3 species predictions with confidence bars
Demo app | Flask web app with photo upload and prediction display
Weights | .pth file shipped with the build
Project features
Transfer-Learning Fish Classifier [implemented] — ImageNet pre-trained ResNet-style backbone with a fine-tuned species classifier head, trained on the QUT / Fish4Knowledge collection.
Two-Phase Fine-Tuning [implemented] — Classifier head trained first, then short full-network fine-tuning for domain adaptation to underwater-style imagery.
Underwater-Style Augmentation [implemented] — Brightness/contrast jitter, flips and crops simulate the lighting and turbidity variation of real fish photos.
Training Notebook with Full Logging [implemented] — Validation accuracy and loss curves every epoch, plus a per-class confusion matrix computed during the build.
Demo App with Top-3 Predictions [implemented] — Upload a fish photo and get the top-3 predicted species with confidence scores and bars.
Exportable .pth Weights [implemented] — The checkpoint suits deployment-style demos.
Confidence Threshold and Top-K Display [configurable] — Prediction display settings adjustable in the demo config.
Multi-Fish Detection [future-scope] — Detecting and classifying several fish in one frame is documented as possible future work, not included in this build.
What is included
Complete source code: data pipeline, training, evaluation, Flask demo app
Trained CNN weights (.pth)
Dataset download and split-configuration scripts
Project report PDF: background, dataset analysis, methodology, evaluation, error analysis
PPT presentation for final review
Viva Q&A preparation document: transfer learning, CNNs, augmentation, evaluation metrics
Setup guide: environment, dependencies, GPU guidance for training
Advantages
- Transfer learning from an ImageNet pre-trained backbone means the classifier trains on a modest fish dataset instead of needing millions of labeled images.
- Two-phase fine-tuning (classifier head first, then a short full-network adaptation) adapts the model to underwater-style imagery.
- Underwater-style augmentation (brightness and contrast jitter, flips, crops) simulates the lighting and turbidity variation of real fish photos.
- The demo app returns the top-3 species with confidence scores for every upload.
- The training notebook logs validation accuracy and loss curves every epoch, so the whole training run is inspectable.
Disadvantages
- Accuracy depends on photo quality: murky water, heavy occlusion and partial fish views classify worse.
- The dataset covers a limited set of freshwater species, so wild or marine fish are out of distribution and receive the nearest-looking label.
- The model is trained on single-fish photos: crowded frames are labeled by the most prominent fish only.
- An educational prototype, not a certified fisheries or aquaculture tool: it must not drive real stock-management decisions.
Limitations & prerequisites
Accuracy depends on photo quality — murky water, heavy occlusion and partial fish views classify worse; the report documents this bias.
The dataset covers a limited set of freshwater species, so wild or marine fish are out of distribution and receive the nearest-looking label.
The model is trained on single-fish photos; crowded frames may be labeled by the most prominent fish only.
The ~85%+ figure is a design target for the training run, not a pre-measured claim.
This is an educational prototype, not a certified fisheries or aquaculture tool — it must not drive real stock-management decisions.
Frequently Asked Questions
What is transfer learning and why is it used here?
The network starts from a backbone pre-trained on ImageNet, so it already recognizes edges, textures and shapes. Only the species classifier head — plus a short fine-tuning phase — is retrained on fish photos, which means strong accuracy from a far smaller dataset than training from scratch would need.
What dataset does the model train on?
The QUT fish dataset / Fish4Knowledge collection (Anantharaman et al.), the standard academic reference for underwater fish recognition. The report documents the species list and the train/validation split used in the build.
How is the model evaluated?
The training notebook computes validation accuracy every epoch, logs accuracy and loss curves, and builds a per-class confusion matrix — the report documents the procedure and the metrics the training run computes (design target ~85%+).
What if my photo has more than one fish?
The model is trained on single-fish photos, so crowded frames may get the nearest-looking label for the most prominent fish; the Limitations section documents this.
Can it identify marine species?
No — it is a closed-set classifier over the freshwater species in the dataset, and the demo says so openly. Out-of-distribution fish get the nearest-looking label.
Is this project suitable for a final-year project?
Yes — for B.E./B.Tech Computer Science, AI/ML and Data Science students. It covers transfer learning, CNN fine-tuning, underwater-style augmentation, and confusion-matrix evaluation, with a demo that works on real fish photos.
Components & software requirements
Python 3.10
PyTorch (transfer learning, validation, inference)
torchvision, PIL, OpenCV (image loading, augmentation, preprocessing)
NumPy and scikit-learn (metrics, confusion matrix)
Matplotlib and Seaborn (accuracy and loss curves)
Flask (demo web application)
QUT fish dataset / Fish4Knowledge collection (download and split scripts included)
Trained weights as .pth, exported from the included training run; a GPU is recommended for training (cloud-GPU guidance included)
Delivery information
Built-to-order. The two-phase transfer-learning run on the QUT / Fish4Knowledge data (the pacing item), the confusion-matrix evaluation, the demo app, and the full documentation kit (report, PPT, viva Q&A, setup guide) are prepared fresh for the buyer. The exact build schedule is confirmed at quotation.
Support terms
- Setup guidance: environment, dependencies, dataset download, GPU/cloud-GPU options for training
- Viva preparation: transfer learning, CNN fine-tuning strategy, augmentation for underwater imagery, reading confusion matrices
- Customization discussion: new species classes, UI changes, multi-fish experiments (feasibility confirmed before quoting)
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.