Giter Club home page Giter Club logo

csgo_yolov5's Introduction

csgo_yolov5

Before doing anything, you must clone this repos and install requirements

$ git clone https://github.com/Surayuth/csgo_yolov5
$ cd csgo_yolov5
$ pip install -r requirements.txt

1. Create dataset for training, validation and testing by

$ python3 create_dataset.py 0.2 0.1 --resize 512 512 --download -1

The command above creates a directory, csgo_dataset, having the right structure for being trained by yolov5 model. The val_ratio and test_ratio are set to 0.2 and 0.1, respectively. You can also resize all the images to specific size by using --resize w h. The optional argument --download -1 will download all datasets available to this repos right now. You can change -1 to the numbers of datasets you want to download, i.e., --download 1 2.

2. Install yolov5 (inside csgo_yolov5)

$ git clone https://github.com/ultralytics/yolov5 
$ cd yolov5
$ pip install -r requirements.txt  

3. Copy YAML file of csgo_dataset to yolov5 directory

$ cp ../csgo.yaml ./

4. Train model

$ python3 train.py --img 512 512 --batch 4 --epochs 5 --data csgo.yaml --weights yolov5s.pt

The trained model will be in yolov5/runs/train/exp/weights/. The lastest model may be in different exp. 5. export to onnx

$ python3 models/export.py --weights runs/train/exp/weights/best.pt --img 512 512 --batch 1 

csgo_yolov5's People

Contributors

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