Skip to content

Unable to run evaluation with the provided trained model #227

Open
@muhammad-usama-aleem

Description

@muhammad-usama-aleem

Search before asking

  • I have searched the Roboflow Notebooks issues and found no similar bug report.

Notebook name

train-yolov7-object-detection-on-custom-data-openvino-torch-ort.ipynb

Bug

!python detect_without_jit.py --weights /content/yolov7/runs/best.pt --conf 0.25 --img-size 640 --source UWH-6/test/images/DJI_0021_mp4-32_jpg.rf.0d9b746d8896d042b55a14c8303b4f36.jpg

I am getting the following error when running the above command:

Traceback (most recent call last):
  File "/content/yolov7/detect_without_jit.py", line 10, in <module>
    from models.experimental import attempt_load
  File "/content/yolov7/models/experimental.py", line 6, in <module>
    from models.common import Conv, DWConv
  File "/content/yolov7/models/common.py", line 11, in <module>
    from torchvision.ops import DeformConv2d
  File "/usr/local/lib/python3.10/dist-packages/torchvision/__init__.py", line 6, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
  File "/usr/local/lib/python3.10/dist-packages/torchvision/_meta_registrations.py", line 7, in <module>
    import torchvision.extension  # noqa: F401
  File "/usr/local/lib/python3.10/dist-packages/torchvision/extension.py", line 92, in <module>
    _check_cuda_version()
  File "/usr/local/lib/python3.10/dist-packages/torchvision/extension.py", line 78, in _check_cuda_version
    raise RuntimeError(
RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA major versions. PyTorch has CUDA Version=12.1 and torchvision has CUDA Version=11.8. Please reinstall the torchvision that matches your PyTorch install.

Environment

Collab

Minimal Reproducible Example

Run the code blocks as they are and then restart the runtime, when asked for restart the runtime after installing the dependencies

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions