Giter Club home page Giter Club logo

Comments (2)

ziishuo avatar ziishuo commented on September 23, 2024
   我使用anaconda创建了一个python3.9的虚拟环境,该环境放置在名为env的文件夹中。另外GitHub上下载的PaddleClas代码文件与env文件夹同级,在参考链接https://github.com/PaddlePaddle/PaddleClas/blob/release/2.5/docs/zh_CN/models/PP-ShiTu/README.md的教程后创建了paddleclas库,该库与PaddleClas文件夹下paddleclas.py文件同名,在“执行命令体验索引库构建”的时候会造成“circular import”错误,建议修改一下paddleclas.py文件名(项目经验较少,想法如有错误请多多包含)。

(D:\Programme\Projects\pp_shitu\python) D:\Programme\Projects\pp_shitu\PaddleClas>python paddleclas.py --build_gallery=True --model_name="PP-ShiTuV2" -o IndexProcess.image_root=./drink_dataset_v2.0/gallery/ -o IndexProcess.index_dir=./drink_dataset_v2.0/index -o IndexProcess.data_file=./drink_dataset_v2.0/gallery/drink_label.txt
Traceback (most recent call last):
File "D:\Programme\Projects\pp_shitu\PaddleClas\paddleclas.py", line 44, in
from deploy.python.predict_cls import ClsPredictor
File "D:\Programme\Projects\pp_shitu\PaddleClas\deploy\python\predict_cls.py", line 20, in
from paddleclas.deploy.utils import logger, config
File "D:\Programme\Projects\pp_shitu\PaddleClas\paddleclas.py", line 44, in
from deploy.python.predict_cls import ClsPredictor
ImportError: cannot import name 'ClsPredictor' from partially initialized module 'deploy.python.predict_cls' (most likely due to a circular import) (D:\Programme\Projects\pp_shitu\PaddleClas\deploy\python\predict_cls.py)

from paddleclas.

cuicheng01 avatar cuicheng01 commented on September 23, 2024

您的经验我们会考虑采纳,感谢提问

from paddleclas.

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.