ModuleNotFoundError: No module named 'yolov7.models'

Question:

I’m trying to move BotSORT on DockerContainer.

I wrote the code below on jupyter-notebook.Then,the Error written on title is occured.

enter image description here

Folder construct is below.

2

Am I wrong about path? I’m new to Machine Learning.
Could anyone give me some advice? thanks.

Asked By: y_ok

||

Answers:

You seem to have your yolov7 folder under another folder called BoTSORT. The way of fixing the import should be:

from BoTSORT.yolov7.models.experimental import attempt_load
Answered By: Mike B

You can also add the folder that you want python to look into, to the path via:

import sys
sys.path.insert(0, './yolov7')

And then python will be able to import models.

Answered By: mmheydari97
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.