Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update detect.py for torchscript support #1

Merged
merged 12 commits into from
Oct 12, 2021

Commits on Oct 9, 2021

  1. update detect.py for torchscript support

    Simple update for torchscript support. Assumes the torchscript file has been generated with `export.py`
    andreiionutdamian committed Oct 9, 2021
    Configuration menu
    Copy the full SHA
    e2379fa View commit details
    Browse the repository at this point in the history
  2. Add requests to requirements.txt (ultralytics#5112)

    * Requirements updated
    
    1. Requests added to requirements.txt. That might not be included in all docker base images, adding it to the requirements is safer.
    2. Added a minimum version to Pandas. It's a good practice to have versions for all dependencies.
    
    * Sort alphabetically
    
    * Update requirements.txt
    
    Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
    sandstorm12 and glenn-jocher committed Oct 9, 2021
    Configuration menu
    Copy the full SHA
    97b6b14 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2021

  1. Pass LOCAL_RANK to torch_distributed_zero_first() (ultralytics#5114)

    Co-authored-by: qiningonline <qiningonline@gmail.com>
    qiningonline and NanetteJ committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    4a6dfff View commit details
    Browse the repository at this point in the history
  2. Fix different devices bug when moving model from GPU to CPU (ultralyt…

    …ics#5110)
    
    * fix different devices bug
    
    * extend _apply() instead of to() for a general fix
    
    * Only apply if Detect() is last layer
    
    Co-authored-by: Jebastin Nadar <njebastin10@gmail.com>
    
    * Indent fix
    
    * Add comment to yolo.py
    
    * Add comment to common.py
    
    Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
    jebastin-nadar and glenn-jocher committed Oct 10, 2021
    Configuration menu
    Copy the full SHA
    a0e1504 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4f9718a View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Configuration menu
    Copy the full SHA
    ba4b79d View commit details
    Browse the repository at this point in the history
  2. Update val.py pad = 0.0 if task == speed else 0.5 (ultralytics#5121)

    * Update val.py `pad = 0.0 if task == speed else 0.5`
    
    * Cleanup
    glenn-jocher committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    7d37b3c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4cf7d48 View commit details
    Browse the repository at this point in the history
  4. Fix ROOT as relative path (ultralytics#5129)

    * use os.path.relpath instead of relative_to
    
    * use os.path.relpath instead of relative_to
    
    * Remove os.path from val.py
    
    * Remove os.path from train.py
    
    * Update detect.py import to os
    
    * Update export.py import to os
    
    Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
    maltelorbach and glenn-jocher committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    153873e View commit details
    Browse the repository at this point in the history
  5. Refactor Detect() anchors for ONNX <> OpenCV DNN compatibility (ult…

    …ralytics#4833)
    
    * refactor anchors and anchor_grid in Detect Layer
    
    * fix CI failures by adding compatibility
    
    * fix tf failure
    
    * fix different devices errors
    
    * Cleanup
    
    * fix anchors overwriting issue
    
    * better refactoring
    
    * Remove self.anchor_grid shape check (redundant with self.grid check)
    
    Also PEP8 / 120 line width
    
    * Convert _make_grid() from static to dynamic method
    
    * Remove anchor_grid.to(device)
    
    clone() should already clone to same device as self.anchors
    
    * fix different devices error
    
    Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
    jebastin-nadar and glenn-jocher committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    9d75e42 View commit details
    Browse the repository at this point in the history
  6. Add OpenCV DNN option for ONNX inference (ultralytics#5136)

    * Add OpenCV DNN option for ONNX inference
    
    Usage:
    
    ```bash
    python detect.py --weights yolov5s.onnx  # ONNX Runtime inference
    python detect.py --weights yolov5s.onnx -dnn  # OpenCV DNN inference
    ```
    
    * DNN prediction to tensor
    
    * Update detect.py
    glenn-jocher committed Oct 11, 2021
    Configuration menu
    Copy the full SHA
    0bf24cf View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2021

  1. Configuration menu
    Copy the full SHA
    14a3b8f View commit details
    Browse the repository at this point in the history