Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

RizzaRoberto/fasterrcnn-retinanet-african-wildlife-detection

Domain:

environment and energy

Record type:

project
Creator:
Riz
Host:
Object detection on four African wildlife species using Faster R-CNN and RetinaNet. This project leverages deep learning models to detect and classify animals in the African Wildlife dataset. Implemented in PyTorch, it includes data preprocessing, model training, evaluation, and inference. This repository contains a complete pipeline for training and evaluating an object detection model using Faster R-CNN and RetinaNet with a ResNet-50 backbone. # Features ✔️ Dataset Preparation: - Organizes images and labels into separate directories (img/ and label/). - Renames and sorts files for consistency. - Adjusts class labels (+1) to account for background class. ✔️ Custom PyTorch Dataset: - Implements AnimalDataset, a PyTorch dataset class to load images and annotations. - Converts bounding boxes from YOLO format to absolute coordinates. ✔️ Model Training (Fine-Tuning): - Loads a pretrained Faster R-CNN ResNet-50 model and fine-tunes it on the dataset. - Splits data into 70% train, 20% test, and 10% validation. - Uses SGD optimizer with momentum and weight decay. - Implements a learning rate scheduler. - Supports training on GPU. ✔️ Evaluation & Logging: - Evaluates performance on test and validation sets. - Logs training progress using TensorBoard. - Saves model checkpoints after each epoch. ✔️ Testing: - Performs quantitative evaluation on test data. - Conducts qualitative testing on sample images. # Dataset The models were trained on the AfricanWildlife Dataset --> kaggle.com , which was sourced from the Kaggle platform. This dataset was manually created by collecting images from Google and labeling them in the YOLO format. It represents four species commonly found in South African nature reserves: Buffalo, Elephant, Rhino, and Zebra. The dataset is organized into four separate folders, each corresponding to a specific class. It contains: - 377 images for Buffalo and Elephant - 380 images for Rhino and Zebra Each dataset sample consists of a JPEG image and a corresponding text file containing annotation data in YOLO format. The .txt files store class labels and bounding box coordinates, structured according to the YOLO annotation system. # Experiment phase We trained both models (Faste …

Visit

github.com

Tasks

computer vision