Git Product home page Git Product logo

quantized-yolov5's Introduction

Low Precision Yolo

This repo contains code for training Yolo(v1, v3, v5) architectures using different quantization. It utilizes Brevitas which is a Pytorch research library for quantization-aware training (QAT) from Xilinx. The code is developed on top of YOLOV5.

Installation

$ git clone [email protected]:sefaburakokcu/quantized-yolov5.git
$ cd yolov5
$ pip install -r requirements.txt

Inference

detect.py runs inference on a variety of sources and saving results to runs/detect.

$ python detect.py --weights /path-to-weights-folder
		    --source 0  # webcam
		            file.jpg  # image 
		            file.mp4  # video
		            path/  # directory
		            path/*.jpg  # glob
		            'https://youtu.be/NUsoVlDFqZg'  # YouTube
		            'rtsp://example.com/media.mp4'  # RTSP, RTMP, HTTP stream

Training

Run commands below to reproduce results on Widerface dataset.

$ python train.py --data widerface.yaml --cfg models/hub/yolov1-tiny-quant.yaml --weights '' --batch-size 128

Export

Sigmoid activation is used in detect layer when training whereas HardTanh is used when exporting the model for FINN.

$ python export.py --data widerface.yaml --weights runs/train/exp1/weights/best.pt --nodetect

Citation

If you utilize this repo in your research, please cite it as:

@inproceedings{Gunay_2022, series={EECSS’22},
   title={LPYOLO: Low Precision YOLO for Face Detection on FPGA},
   ISSN={2369-811X},
   url={http://dx.doi.org/10.11159/mvml22.108},
   DOI={10.11159/mvml22.108},
   booktitle={Proceedings of the 8th World Congress on Electrical Engineering and Computer Systems and Science},
   publisher={Avestia Publishing},
   author={Gunay, Bestami and Okcu, Sefa Burak and Bilge, Hasan Sakir},
   year={2022},
   month=jul, collection={EECSS’22} }

References

Authors

quantized-yolov5's People

Contributors

glenn-jocher avatar alexstoken avatar ayushexel avatar borda avatar nanocode012 avatar taoxiesz avatar developer0hye avatar kalenmike avatar lornatang avatar zldrobit avatar anon-artist avatar sefaburakokcu avatar skalskip avatar yxnong avatar tkianai avatar dependabot[bot] avatar laughing-q avatar jebastin-nadar avatar aehogan avatar cristifati avatar imyhxy avatar lorenzomammana avatar zhiqwang avatar kinoute avatar yeric1789 avatar wanghaoyang0106 avatar olehb avatar jdfr avatar fcakyon avatar albinxavi 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.