Giter VIP home page Giter VIP logo

Comments (4)

cwhgn avatar cwhgn commented on May 10, 2024

可能是PYTHONPATH设置问题。可以尝试执行export PYTHONPATH=当前项目路径,试试是否能够成功运行。

from damo-yolo.

havefunheehee avatar havefunheehee commented on May 10, 2024

可能是PYTHONPATH设置问题。可以尝试执行export PYTHONPATH=当前项目路径,试试是否能够成功运行。

您好,我是在Windows10 的系统环境下搭建虚拟环境,进行推理/训练。
微信截图_20221213152114
如图所示,我在windows的环境变量中添加了项目的文件路径为环境变量,但是使用tools/torch_inference.py在pycharm运行/推理的时候任然是出现以下报错:
报错
我输入的参数如下图:
输入参数
请问我应该如何解决这个问题呢?期待您的回复!

from damo-yolo.

HYLcool avatar HYLcool commented on May 10, 2024

您好,首先您可以先确认下在configs路径下是否存在该配置文件。

其次,请问您是否是在pycharm里直接右键点击tools/torch_inference.py的代码编辑页面然后点击Run运行的?

如果是的话,这样会在根目录下运行绝对路径的torch_inference.py,此时config文件的路径就不再是configs/xxx.py

我们建议您在DAMO-YOLO的主目录下运行tools/torch_inference.py,如在命令行下运行:

cd <path_to_DAMO-YOLO>
python tools\torch_inference.py -f configs\xxx.py -p xxx.jpg -c xxx.pth

这样能够有效地避开这类路径相关的问题。

此外,注意到您没有指定ckpt路径,您可以在DAMO-YOLO代码库的Model Zoo中找到各个模型的torch模型地址,下载后记得指定哈~

from damo-yolo.

havefunheehee avatar havefunheehee commented on May 10, 2024

您好,首先您可以先确认下在configs路径下是否存在该配置文件。

其次,请问您是否是在pycharm里直接右键点击tools/torch_inference.py的代码编辑页面然后点击Run运行的?

如果是的话,这样会在根目录下运行绝对路径的torch_inference.py,此时config文件的路径就不再是。configs/xxx.py

我们建议您在DAMO-YOLO的主目录下运行tools/torch_inference.py,如在命令行下运行:

cd <path_to_DAMO-YOLO>
python tools\torch_inference.py -f configs\xxx.py -p xxx.jpg -c xxx.pth

这样能够有效地避开这类路径相关的问题。

此外,注意到您没有指定ckpt路径,您可以在DAMO-YOLO代码库的Model Zoo中找到各个模型的torch模型地址,下载后记得指定哈~

您好,谢谢您的回复。
按照您的指导,已解决我当前的问题,谢谢您!

from damo-yolo.

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.