Giter Site home page Giter Site logo

ai4vn-vaipe-baseline's Introduction

YOLOv6 - VAIPE baseline

Introduction

YOLOv6 is a single-stage object detection framework dedicated to industrial applications, with hardware-friendly efficient design and high performance. This repo is inherited from official implementation repo of Yolov6 with modifications in evaluation (wmAP) and convert dataset for AI4VN challenge. With yolov6s configuration, this baseline achieved approximately 44% wmAP on public test. Feel free to fork and edit this baseline. You should utilize the logical constraints from Prescription data by adding OCR module in this repo.

Quick Start

Install

git clone https://github.com/VAIPE-Challenge-2022/ai4vn-vaipe-baseline
cd ai4vn-vaipe-baseline
pip install -r requirements.txt

Training

Single GPU

python tools/train.py --batch 32 --conf configs/yolov6s.py --data data/coco.yaml --device 0

Multi GPUs (DDP mode recommended)

python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --batch 256 --conf configs/yolov6s.py --data data/coco.yaml --device 0,1,2,3,4,5,6,7
  • conf: select config file to specify network/optimizer/hyperparameters
  • data: prepare COCO dataset, YOLO format coco labes and specify dataset paths in data/ai4vn.yaml. Your dataset can be created by running
python data/convert_ai4vn.py

to convert unzipped folder to coco format labels To run this file successfully, you might be replace the path '/home/ubuntu/shared/' with your own unzipped path. Notes that all the folders like public test, public train should be located together in your path like '/home/ubuntu/shared/public_test/'. The structure of ai4vn folder should be

data/
    ├──ai4vn/
        ├── annotations
        |    "will be created by Yolov6, you don't need to create it manually"
        ├──images
        |    ├──train
        |    ├──val
        |    ├──test
        ├──labels
            ├──train
            ├──val
            ├──test

Evaluation

Run evaluation on VAIPE public test

python tools/eval.py --data data/ai4vn.yaml --batch 32 --weights yolov6s.pt --task val

Resume

If your training process is corrupted, you can resume training by

# single GPU traning.
python tools/train.py --resume
# multi GPU training.
python -m torch.distributed.launch --nproc_per_node 8 tools/train.py --resume

Your can also specify a checkpoint path to --resume parameter by

# remember replace /path/to/your/checkpoint/path to the checkpoint path which you want to resume training.
--resume /path/to/your/checkpoint/path

ai4vn-vaipe-baseline's People

Contributors

thanhhff avatar huyphan168 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.