Giter Site home page Giter Site logo

yolov7_custom's Introduction

yolov7 for customization

To custom, this is base model of yolov7

yolo annotate format

# coco to yolo format
def coco_to_yolo(item):
    img_w, img_h = item['width'], item['height']
    x, y = item['bbox'][0], item['bbox'][1]
    w, h = item['bbox'][2], item['bbox'][3]
    x_centre = (x + (x+w))/2
    y_centre = (y + (y+h))/2
    x_centre = x_centre / img_w
    y_centre = y_centre / img_h
    w = w / img_w
    h = h / img_h
    return x_centre, y_centre, w, h

How to use

Refer to Makefile

train

# yolov7
python3 train.py --workers 1 --batch-size 4 --data data/origin.yaml --img 640 640 --mtype yolov7 --cfg cfg/training/yolov7.yaml --weights '' --name yolov7 --hyp data/hyp.scratch.p5.yaml
# aux
python3 train_aux.py --workers 0 --batch-size 4 --data data/origin.yaml --img 640 640 --mtype yolov7_aux --cfg cfg/training/yolov7-w6.yaml --weights '' --name yolov7-w6 --hyp data/hyp.scratch.p6.yaml

test

# yolov7
python3 test.py --data data/origin.yaml --img 640 --batch 4 --conf 0.001 --iou 0.65 --device 0 --weights <wight_path> --name yolov7_640_val

detect

# yolov7
python3 detect.py --weights <wight_path> --conf 0.25 --img-size 640 --source <image_path>

augument

python3 augment_data.py -i <image path> -l <label path> -o <output> -n <number of progress>

ONNX Export

python3 export.py --weights <wight_path> --grid --end2end --simplify --topk-all 100 --iou-thres 0.65 --conf-thres 0.35 --img-size 640 640 --max-wh 640

plus

shinkhorn yolov7

git clone -b shinkhorn <shinkhorn repogitory_url>

References

yolov7_custom's People

Contributors

engkimo 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.