Code Monkey home page Code Monkey logo

yolov7_custom_data_trainig's Introduction

yolov7 architecture

image

clone repo

1. git clone https://github.com/WongKinYiu/yolov7.git

  1. cd yolov7/

  2. !pip install requirements.txt

  3. script for dividing data into train,test & validation python yolov_train_test_split.py

create customdata folder inside yolov7 data set download link :customdata

image

-inside images paste all train & valid images

-inside labels all labels of train & valid image

. go insiode data folder & create custom_data.yaml & add path of image & labels (i.e .txt)

# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
train: ./customdata/train.txt  
val: ./customdata/valid.txt  




# number of classes
nc: 3

# class names
names: ['pistol','rifle','revolver']

for creating train.txt & val.txt use (it contains the path of images )

!python genrate_test.py

image

  1. go inside cfg/training & select any .yaml file do changes such as no classes

image

  1. start training using

!python train.py --workers 8 --device 0 --batch-size 16 --data data/custom_data.yaml --img 640 640 --cfg cfg/training/yolov7_custom_3.yaml --weights '' --name yolov7xcustom3 --hyp data/hyp.scratch.p5.yaml --epochs 200

  1. inference on video/image python yolov7_inference.py # add alll file path inside this file

python detect.py --weights yolov7.pt --conf 0.25 --img-size 640 --source inference/images/horses.jpg

yolov7_custom_data_trainig's People

Contributors

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