Skip to content

Automatic Tiger Surveillance using YOLOv8 and EnlightenGAN aimed for Tiger Conservation

Notifications You must be signed in to change notification settings

Gaurav0502/tiger-detection-using-enlightengan-and-yolo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Tiger Spotting for Wildlife Sanctuaries

Aim

In this repository, tiger detection is implemented using YOLOv8 from Ultralytics. Moreover, the issue of Low Illumination Images is handled by the using EnlightenGAN for Image Enhancement.

Datasets

  • The ATRW dataset is used for the project. It is published in this paper .
  • The ATRW dataset comprises train and validation data in PASCAL VOC format and testing data in COCO format. Both of them are converted in YOLO Darknet format as expected by Ultralytics. The dataset is open-source and available in Kaggle here.
  • The images in ATRW dataset are enhanced in terms of illumination using EnlightenGAN and the enhanced dataset is made available here.

Kaggle Notebooks

The tasks of Tiger Detection and Image Enhancement were carried out in Kaggle using GPU P100. The codes can be found in the respective notebooks:

Model Inference

Requirements

pip install ultralytics

Sample Code

from ultralytics import YOLO
import matplotlib.pyplot as plt

# Loading the best checkpoint
model = YOLO("weights/best_enlightengan_and_yolov8.pt") # or "weights/best_yolov8.pt" for plain YOLOv8 inference

# For training and validation
model.train(data=path_to_yaml_file, epochs=number_of_epochs)
model.val()

# For testing the model on a test folder
model.val(data=path_to_yaml_file, split="test")

# For testing the model on an image
result = model.predict(source=path_to_image)
annotated = result[0].plot(line_width=linewidth)
plt.imshow(annotated)

Results

  • A sample prediction is provided for both cases: YOLOv8 and EnlightenGAN + YOLOv8.
YOLOv8 (Low Illumination) EnlightenGAN + YOLOv8 (Enhanced Illumination)
  • The results of the training and validation are available in wandb here.

Conference Paper Citation

@article{pendharkar2023efficient,
  title={An Efficient Illumination Invariant Tiger Detection Framework for Wildlife Surveillance},
  author={Pendharkar, Gaurav and Micheal, A Ancy and Misquitta, Jason and Kaippada, Ranjeesh},
  journal={arXiv preprint arXiv:2311.17552},
  year={2023}
}

Referenced GitHub Repositories