Giter Club home page Giter Club logo

Comments (4)

zhiqwang avatar zhiqwang commented on May 18, 2024 1

Hi @sourabhyadav

Thank you for providing such detailed information.

This is because we use some features of torch 1.7.0+ and torchvision 0.8.1+, we recommend that you upgrade PyTorch and TorchVision to the stable version.

from yolort.

sourabhyadav avatar sourabhyadav commented on May 18, 2024 1

Yeah it did not work. Following is the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/__init__.py", line 3, in <module>
    from yolort import models
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/models/__init__.py", line 5, in <module>
    from .yolo_module import YOLOModule
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/models/yolo_module.py", line 9, in <module>
    from . import yolo
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/models/yolo.py", line 12, in <module>
    from .box_head import YoloHead, SetCriterion, PostProcess
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/models/box_head.py", line 9, in <module>
    from . import _utils as det_utils
  File "/data/sourabh/Play_n_n_Learn/CV_DL/yolov5_exp/yolov5-rt-stack/yolort/models/_utils.py", line 8, in <module>
    from torchvision.ops.boxes import box_convert
ImportError: cannot import name 'box_convert'

Anyways thanks for now.

from yolort.

sourabhyadav avatar sourabhyadav commented on May 18, 2024

Hi @sourabhyadav

Thank you for providing such detailed information.

This is because we use some features of torch 1.7.0+ and torchvision 0.8.1+, we recommend that you upgrade PyTorch and TorchVision to the stable version.

@zhiqwang Thanks.
It worked with updated torchvision==0.8.0 and torch==1.7.0 versions.

Is is possible to make it work on torchvision==0.7.0 and torch==1.6.0 since our production environment is deployed on these versions?

from yolort.

zhiqwang avatar zhiqwang commented on May 18, 2024

Hi @sourabhyadav ,

Just for this bug, you can change this line

https://github.com/zhiqwang/yolov5-rt-stack/blob/76f5a5d33b99ffde162b85cfe443f3142348dd2e/yolort/models/box_head.py#L6

to

from torchvision.ops.boxes import batched_nms

But I'm not sure if there is a problem elsewhere.

from yolort.

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.