FishMarket BD: A Dataset of Local Market Freshwater Fish Species in Bangladesh for Deep Learning and Computer Vision
Description
Dataset Overview: This dataset comprises 1,581 images of ten popular freshwater fish species commonly found in local Bangladeshi markets. The images were captured under ambient retail market lighting conditions across varying angles, orientations, and background surfaces, and are organized into ten species-based class folders. Class DistributionSilver Carp: 341 Catla: 321 Mrigal: 302 Baim (Zig-zag Eel): 124 Tengra (Mystus Catfish): 114 Telapiya (Tilapia): 100 Pabda (Pabdah Catfish): 100 Roi (Rohu / Rui): 70 Poti (Swamp Barb / Puti): 62 Bowal (Wallago Catfish): 47 Data ProcessingOriginal raw market images were standardized to a 3-channel RGB color space, resized to a uniform $224 \times 224$ pixels matrix, and normalized by scaling pixel intensity values from $[0, 255]$ down to $[0.0, 1.0]$. Operational Python pipeline scripts (preprocess_pipeline.py, augment_generator.py) are provided in the Preprocessing_Code/ folder for complete operational reproducibility. Folder Structure & NamingThe dataset is structured into ten species directories within both raw (Raw_Dataset/) and processed (Processed_Dataset/) subfolders. Individual image files are assigned standardized unique identifiers (e.g., FMBD_0001.jpg) and mapped item-by-item with local, English, and scientific taxonomy names in metadata.csv within the Metadata/ folder. PurposeThis dataset supports the development and evaluation of lightweight automated fish species recognition systems using computer vision and deep learning. It is structured for benchmarking resource-efficient transfer learning models (e.g., MobileNetV2), validating Explainable AI (XAI / Grad-CAM) feature heatmaps, and powering real-world applications in smart aquaculture, fisheries management, food authenticity, and digital market sorting.
Files
Steps to reproduce
Environment Setup & Dependencies: Install Python 3.8 or higher along with the required computer vision and machine learning libraries: numpy, pandas, pillow (PIL), matplotlib, seaborn, scikit-learn, and tensorflow (2.x). Ensure GPU acceleration is enabled (e.g., in Google Colab or local environment) for efficient image array processing. Directory Structuring:Place the raw uncompressed market image folders inside a root directory named Raw_Dataset/. Create output directories named Processed_Dataset/ and Metadata/ to store the output processing assets. Color Space & Dimensional Standardization:Run the preprocessing script (preprocess_pipeline.py). Each raw image is opened using PIL and checked for color channel integrity; non-RGB images (e.g., single-channel grayscale or CMYK) are converted to 3-channel RGB format. Images are spatially resized to a uniform dimension of $224 \times 224$ pixels to match standard deep learning backbone inputs (e.g., MobileNetV2) and saved to Processed_Dataset/. Metadata Extraction:Execute the metadata generation script (generate_metadata.py). The script scans all image files, extracts spatial dimensions, file sizes, and color modes, pairs them with local, English, and scientific taxonomic names, and exports metadata.csv inside Metadata/. Pixel Normalization & Stratified Splitting:Load the $224 \times 224$ preprocessed images as NumPy arrays and normalize pixel intensities from $[0, 255]$ down to $[0.0, 1.0]$ by dividing by $255.0$. Apply stratified random sampling using scikit-learn to partition the dataset into an 80% training set, 10% validation set, and 10% testing set while maintaining balanced class distributions across all 10 species. Data Augmentation (Optional for Model Training):Configure TensorFlow's ImageDataGenerator with random rotations ($\le 20^\circ$), horizontal/vertical translations ($\le 20\%$), shear transformations ($0.2$), zoom ranges ($0.2$), and horizontal flipping to simulate market viewing variations during model training.
Institutions
- Daffodil International UniversityDhaka Division, Dhaka