Skip to content

A Python application built using YOLOv8 that can detect farm animals.

License

Notifications You must be signed in to change notification settings

David-Ademola/Animal-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animal Detection with YOLOv8

This project uses YOLOv8 for real-time animal detection. It supports multiple animal classes, including chickens, cows, goats, pigs, and sheep. The application allows users to choose the type of animal they want to detect.

Prerequisites

Before running the application, make sure you have the following dependencies installed:

  • Python 3.x
  • OpenCV
  • Ultralytics YOLO library

You can install the required Python packages using the provided requirements.txt file:

Usage

  1. Clone the repository:

    git clone https://github.com/David-Ademola/Animal-Detection.git
    cd Animal-Detection
  2. Install dependencies:

    ⠀
    pip install -r requirements.txt
    ⠀
  3. Run the application:

  • To run from a live webcam:
    ⠀
    python main.py --video_resolution (resolution of your webcam)
    ⠀
  • To run on a video:
    ⠀
    python main.py --video_path (path to your video)
    ⠀

Upon running main.py, you will be prompted to enter the type of animal you want to detect. Choose from the supported animals, and the application will start real-time detection using YOLOv8.

Press 'Esc' to exit the application.

Supported Animals

  • Chicken
  • Cow
  • Goat
  • Pig
  • Sheep

Customization

You can customize the application by modifying the count_and_track.py file. Adjust the YOLOv8 weights, default zone polygon, and other parameters as needed.

Contributing

If you'd like to contribute to this project, please follow the standard GitHub flow:

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/your-feature-name
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature/your-feature-name
  5. Submit a pull request

Acknowledgments

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

  • Akinwande David Ademola

Feel free to contribute or report issues!

About

A Python application built using YOLOv8 that can detect farm animals.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages