Coder Social home page Coder Social logo

Training at 1280x720 about yolov5 HOT 17 CLOSED

miles-codes avatar miles-codes commented on September 8, 2024
Training at 1280x720

from yolov5.

Comments (17)

github-actions avatar github-actions commented on September 8, 2024

πŸ‘‹ Hello @miles-codes, thank you for your interest in YOLOv5 πŸš€! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a πŸ› Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email [email protected].

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

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

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@miles-codes training settings are optimized for best results, I would leave them alone. If you want to train at native resolution then just do python train.py --img 1280.

YOLOv5 PyTorch model inference already exploits rectangular shapes, so if you run python detect.py --img 1280 your image short side will automatically use 720.

from yolov5.

miles-codes avatar miles-codes commented on September 8, 2024

I am aware of detect.py which uses letterbox to resize/pad input image to 1280x1280.
But my problem is that resizing/padding is slow, so I wanted to get rid of it by training on 1280x720

Thanks for a quick response anyway :)

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@miles-codes you're not understanding. If you pass a 1280x720 image to python detect.py --img 1280 then it already by default exploits rectangular inference for the minimum possible FLOPs.

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@miles-codes also this is already clearly displayed in the console:

Screenshot 2022-03-11 at 14 07 46

from yolov5.

miles-codes avatar miles-codes commented on September 8, 2024

okay, thank you for the clarification :)

from yolov5.

HeChengHui avatar HeChengHui commented on September 8, 2024

@glenn-jocher
if my detection input is 1920x1080 but my training images are of different sizes, is --imgsze 1920 --rect correct?

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@HeChengHui if you want to detect at --img 1920 then train at --img 1920. It's very simple. Forget about any other options.

from yolov5.

HeChengHui avatar HeChengHui commented on September 8, 2024

@glenn-jocher Thank you!

A side thought, if detecting at 1920 is too slow and I changed detect size to 960, what would be the performance impact with a model trained at 1920?

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@HeChengHui README Table curves shows models trained at 1280 running inference from 320 to 1280 image size.

Screenshot 2022-03-15 at 12 06 05

from yolov5.

HeChengHui avatar HeChengHui commented on September 8, 2024

@glenn-jocher
Is it correct to read it as each dot of each curve representing an inference at different img-size starting from 320 at the bottom and 1280 at the top?

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@HeChengHui yes!

from yolov5.

HeChengHui avatar HeChengHui commented on September 8, 2024

@glenn-jocher Thank you for the guidance!

from yolov5.

wwcc1107 avatar wwcc1107 commented on September 8, 2024

if I want to detect at --img 1024 ,but train at --img 256,does it work?

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@wwcc1107 depends on your definition of work

from yolov5.

stphtan94117 avatar stphtan94117 commented on September 8, 2024

i have a dataset from a lot of different img size.
their size are 640x480、1280x720 and 1920x1080 .
if i want to detect 1920x1080 size video, what do i set --img size in train.py ?
--imgsize 1920 is more better than 1280 or 640?

another question
if i want to detect 1920x1080 size video,so i set --imgsize 1920 in detect.py , right?
thanks.

from yolov5.

glenn-jocher avatar glenn-jocher commented on September 8, 2024

@stphtan94117 if your objects are large then training at smaller images sizes will be fine, if they are small then larger images sizes up to native may be better. You can set any training --imgsz you want like this:

python train.py --imgsz 640

from yolov5.

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.