Giter Site home page Giter Site logo

allen-engi / cv-yolov5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from macrobomaster/cv-yolov5

0.0 0.0 0.0 48.47 MB

yolov5 complete code for cv team

License: GNU Affero General Public License v3.0

Shell 0.95% Python 98.57% Dockerfile 0.48%

cv-yolov5's Introduction

Updated Version of YOLOv5 with CUDA Fix

Description

  • Integrated from yolov5 official repo, fixed the issue on cuda core can't run on yolov7 model. Tested on conda environment with python3.9, pytorch=1.11.0, cudatoolkit=1.13

Installation on Windows

Conda environment -- Anaconda https://www.anaconda.com/
Python -- Python 3.9 installed with Anaconda

Install Anaconda

Select Installation Type : 'just me'
Anaconda Install Location : Anywhere you want, doesn't have to be on C drive
Advanved Installation Options :
image

Clone yolov5 Repo

Run git clone https://github.com/FlyerJB/YOLOv7-RoboMaster.git on your command prompt to some dir under C:/ drive or your OS drive to avoid Enviornment failure \

Make Conda Environment

Open Conda Command Prompt with Admin Right
Cd into yolov5 dir with cd <where you clone your yolov5>
And craete Conda Environment Conda Create -n <The Name You Like> Python3.9

image

Activate Conda Environment

Run command Conda activate <The Name You put from previous step>

pip install required packages

Option 1 : Install yolov5 for training on CPU
pip install -r requirements.txt

Option 2 : Install yolov5 for training on RTX GPU
pip install -r requirement_nv_gpu.txt
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113

Validate Cuda Installation ( required for nv_gpu training )

Run python or python3 or py to run python
Run import torch
Run torch.cuda.is_available()
If it returns True, it means CUDA is successfully install on your device with Pytorch.
Then run exit() to exit python

Seperate Dataset

Validate set

10% - 20% of the whole dataset
It goes under data\val foler with train and label folders inside
image

Train set

80% to 90% of the whole dataset
It goes under data\train foler with train and label folders inside
image

Trained model

Our own model have been up uploaded to cv-yolov5/model files Models

Training

With GPU training

# train models
python train.py --workers 1 --device 0 --batch-size -1 --epochs 50 --img 640 --data data/coco_custom.yaml --hyp data/hyp.scratch.custom.yaml --cfg cfg/training/yolov5-custom.yaml --name yolov5-tut3 --weights yolov5.pt  

With CPU training

# train models
python train.py --workers 8 --device CPU --batch-size -1 --epochs 50 --img 640 --data data/coco_custom.yaml --hyp data/hyp.scratch.custom.yaml --cfg cfg/training/yolov5-custom.yaml --name yolov5-tut3 --weights yolov5.pt

cv-yolov5's People

Contributors

glenn-jocher avatar ayushexel avatar alexstoken avatar borda avatar dependabot[bot] avatar nanocode012 avatar developer0hye avatar pre-commit-ci[bot] avatar bill-haoyu-lin avatar imyhxy avatar kalenmike avatar zldrobit avatar zengyf-cver avatar democat3457 avatar lornatang avatar laughing-q avatar thepycoder avatar zhiqwang avatar snyk-bot avatar d57montes avatar anon-artist avatar cristifati avatar jebastin-nadar avatar unglvkitde avatar tkianai avatar yxnong avatar skalskip avatar xylieong avatar lorenzomammana avatar paulguerrie 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.