Giter Site home page Giter Site logo

Train custom dataset about yolov7 HOT 5 OPEN

wongkinyiu avatar wongkinyiu commented on May 18, 2024
Train custom dataset

from yolov7.

Comments (5)

WongKinYiu avatar WongKinYiu commented on May 18, 2024

https://github.com/WongKinYiu/yolov7#training

from yolov7.

yeyan00 avatar yeyan00 commented on May 18, 2024

train demo

dataset: coco128,

set coco.yaml

train: images/train2017  # train images (relative to 'path') 128 images  
val: images/train2017  # val images (relative to 'path') 128 images

set train.py

    parser.add_argument('--weights', type=str, default='runs/yolov7.pt', help='initial weights path')  
    parser.add_argument('--cfg', type=str, default='cfg/training/yolov7.yaml', help='model.yaml path')  
    parser.add_argument('--data', type=str, default='data/coco.yaml', help='data.yaml path')  
    parser.add_argument('--hyp', type=str, default='data/hyp.scratch.p5.yaml', help='hyperparameters path')

convert your dataset like coco128 or coco, either modify util/dataset.py read your dataset

from yolov7.

thongvhoang avatar thongvhoang commented on May 18, 2024

train demo

dataset: coco128,

set coco.yaml

train: images/train2017  # train images (relative to 'path') 128 images  
val: images/train2017  # val images (relative to 'path') 128 images

set train.py

    parser.add_argument('--weights', type=str, default='runs/yolov7.pt', help='initial weights path')  
    parser.add_argument('--cfg', type=str, default='cfg/training/yolov7.yaml', help='model.yaml path')  
    parser.add_argument('--data', type=str, default='data/coco.yaml', help='data.yaml path')  
    parser.add_argument('--hyp', type=str, default='data/hyp.scratch.p5.yaml', help='hyperparameters path')

convert your dataset like coco128 or coco, either modify util/dataset.py read your dataset

As I understand, the custom dataset format like YOLOv5, you can download the dataset https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip to understand the dataset's structure. This link in the script [yolov7](https://github.com/WongKinYiu/yolov7)/[scripts](https://github.com/WongKinYiu/yolov7/tree/main/scripts)/get_coco.sh

from yolov7.

zye1996 avatar zye1996 commented on May 18, 2024

https://github.com/WongKinYiu/yolov7#training

The training fails when set --rect flag. It seems that the labels/segments array length do not match in datasets when doing paste_in augmentation.

from yolov7.

Zagreus98 avatar Zagreus98 commented on May 18, 2024

https://github.com/WongKinYiu/yolov7#training

The training fails when set --rect flag. It seems that the labels/segments array length do not match in datasets when doing paste_in augmentation.

Did you manage to solve the problem? I get recall 0 when training with --rect flag.

from yolov7.

Related Issues (20)

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.