Giter Site home page Giter Site logo

yolo_model_evaluator's Introduction

YOLO Model Evaluator

Effortlessly run object detection on CPU using only OpenCV with this YOLO model evaluation tool. This tool is designed to evaluate the performance of YOLO models by generating essential metrics, including confusion matrix, average precision, recall, and mean average precision (mAP). It provides a comprehensive analysis of your detection model's accuracy. Additionally, the tool offers the capability to generate annotations from the detection model and save them as text files in YOLO format. Simplify your model evaluation process with this straightforward and efficient solution.

Installation:

1. Clone the repo

https://github.com/loginabhay/YOLO_Model_Evaluator.git
cd YOLO_Model_Evaluator

2. Setup a Virtual Environment

This is assuming you have navigated to the YOLO_Model_Evaluator root after cloning it.

NOTE: This is tested under python3.10. For other python versions, you might encounter version conflicts.

# install required packages from pypi
python3 -m venv <your env name>
source <your env name>/bin/activate

3. Intall Requirement to Run the Project

pip install -r requirements.txt

4. Running the Project

  • The project is divided in two major
    • Generating the prediction or annotation from the given images
    • Comparing the prediction with the ground truth in order to evaluate the metrices

4.1 Generating Prediction

Set of arguments used are given below:

Argument Description Flag
-i Path to the input image folder Required
-o Path to the output folder Default='./image_predictions'
-c Path to YOLO Model CFG file Required
-m Path to YOLO Model weight file Required
-conf Change for the confidence value Default=0.3
-n Change for the network input shape Default=416
-nms Change for the nms value Default=0.5
-ca Creates annotations instead of predictions Default=False

Example command

python3 yolo_img_infer_write_prediction.py -i <path to input folder>
                    -c <path to input cfg> -m <path to input weights>

4.2 Evaluating Metrices

Set of arguments used are given below:

Argument Description Flag
-ip Path to the input prediction folder Required
-o Path to the output folder Default='./generated_metrices'
-ig Path to the ground truth folder Required
-s Save the generated metrices in the csv format Default=True
-conf Change for the confidence value Default=0.3
-nm Path to the classes names file Required
-nms Change for the nms value Default=0.5

Example command

python3 Evaluation_matrix_yolo.py -ip <path to input prediction folder>
                    -ig <path to input ground truth folder> -nm <path to classes names>
   

yolo_model_evaluator's People

Contributors

loginabhay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.