-
Clone the repository:
git clone https://github.com/moaaz12-web/Cattle-detection-.git cd cattle-image-recognition
-
Install dependencies:
pip install -r requirements.txt
-
Download weights for Alexnet:
Before running the application, download the AlexNet model weights from the drive link and place it in the working directory https://drive.google.com/file/d/1PnKTyFy9yBtaossFSwrRGsb5S6CPVhEK/view?usp=sharing
-
Run the application:
python tk.py
-
Upload an image through the interface, and witness the advanced image processing workflow:
- The user-uploaded image undergoes a series of processing functions.
- The processed image is sent to the AlexNet model, providing a string output indicating the presence of a cow in the image.
- Subsequently, the image is forwarded to the YOLOv8 model, specifically trained on a cattle dataset.
- YOLOv8 counts the number of cattle in the image and overlays bounding boxes to visually indicate their locations.
- The entire process is seamlessly displayed on the Tkinter interface, offering a comprehensive and interactive user experience.