Skip to content

Cheque Detection using Yolov8. A model to verify and detect various parts bank cheques.

Notifications You must be signed in to change notification settings

prabhleenn/Cheque_Detection

Repository files navigation

📁 Cheque Detection using YOLOv8

In this project, I've implemented cheque detection using the YOLOv8 model. To train and evaluate the model, I have created a custom dataset consisting of 216 images of cheques, which have been manually annotated and labeled by myself using the Roboflow platform. The dataset is divided into three subsets as follows:

  1. Training Set: 182 images
  2. Validation Set: 23 images
  3. Test Set: 11 images

Project Overview

The goal of this project is to detect the authenticity of cheques in images using the YOLOv8 object detection model. The project includes:

  • A custom dataset of cheque images.
  • Pre-trained YOLOv8 models.
  • Scripts for running inference on new images and videos.
  • Scripts for training the model on the custom dataset.

Prediction

Example Image Example Image

Installation

To run this project, you need to have Python 3.7+ and pip installed. Follow the steps below to set up the environment:

  1. Clone the repository:

    git clone https://github.com/prabhleenn/Cheque-Detection.git
    cd Cheque-Detection
  2. Install the required dependencies:

    pip install "https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml"

Running Inference

To run inference on images using the pre-trained (.pt) model, use the following commands:

  • On an image:
    python detect.py --source path/to/your/image.jpg --weights path/to/yolov8/weights.pt

Training 🔍

To train the model on the custom cheque dataset, follow these steps:

  1. Ensure your dataset is in the YOLO format:

    dataset/
    ├── images/
    │ ├── train/
    │ │ ├── image1.jpg
    │ │ ├── image2.jpg
    │ │ └── ...
    │ ├── val/
    │ │ ├── image1.jpg
    │ │ └── ...
    │ └── test/
    │ ├── image1.jpg
    │ └── ...
    └── labels/
    ├── train/
    │ ├── image1.txt
    │ ├── image2.txt
    │ └── ...
    ├── val/
    │ ├── image1.txt
    │ └── ...
    └── test/
    ├── image1.txt
    └── ...

  2. Update the yaml file with your dataset paths and parameters.

  3. Run the training script:

    python train.py --data path/to/your/data.yaml --cfg path/to/yolov8/config.yaml --weights path/to/yolov8/weights.pt

Releases

No releases published