Bird Semantic Segmentation

A computer vision project for automated bird identification and segmentation

Overview

This project implements semantic segmentation techniques for bird image analysis. It's a key component of a larger "Bird Pokedex" project that aims to create an interactive bird identification system, similar to the fictional Pokedex from Pokemon, but for real-world birds.

Original Bird Image Segmentation Mask

Installation

  1. Clone the repository:

    git clone https://github.com/johnhangen/SemanticSegmentation
    cd SemanticSegmentation
  2. Create and activate a virtual environment:

    python -m venv env
    source env/bin/activate # On Windows, use `env\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Download the dataset and place it in the data/ folder.

Methodology

1. Data Loading and Preprocessing

  • Images loaded using PIL and torchvision
  • Resized to 512x512 pixels
  • Organized by bird species

2. Model Setup

  • Pre-trained FCN-ResNet50 model
  • Default transforms and preprocessing
  • Bird class extraction from model categories

3. Segmentation Process

  • Original image preservation
  • Semantic segmentation
  • Probability normalization
  • Binary mask creation

4. Data Organization

  • Results saved in organized_birds/
  • Species-specific directories
  • Original images and masks preserved