roboflow / notebooks

Examples and tutorials on using SOTA computer vision models and techniques. Learn everything from old-school ResNet, through YOLO and object-detection transformers like DETR, to the latest models like Grounding DINO and SAM.
https://roboflow.com/models
4.78k stars 744 forks source link

Unable to run evaluation with the provided trained model #227

Open muhammad-usama-aleem opened 7 months ago

muhammad-usama-aleem commented 7 months ago

Search before asking

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?