Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'crowdposetools' while running scripts for visualization #18

Open
ElviraLL opened this issue Sep 8, 2023 · 2 comments

Comments

@ElviraLL
Copy link

ElviraLL commented Sep 8, 2023

Are we suppose to use main.py as endpoint for inference as well? I'd like to run inference on a single image (for single character) (no annotation) with provided checkpoints trained on Human-arts.

Shall I use the script you provided for inference?

export EDPOSE_COCO_PATH=/path/to/your/cocodir
export Inference_Path=/path/to/your/inference_dir
  python -m torch.distributed.launch --nproc_per_node=1  main.py \
 --output_dir "logs/coco_r50" \
 -c config/edpose.cfg.py \
 --options batch_size=1 epochs=60 lr_drop=55 num_body_points=17 backbone='resnet50' \
 --dataset_file="coco" \
 --pretrain_model_path "./models/edpose_r50_coco.pth" \
 --eval

What's the purpose of ESPOSE_COCO_PATH variable, do we still need it if we only want to run inference? is Inference_Path suppose to contain the testing images that I'd like to try for inference? Why do we need to provide espochs and lr_drop for inference? Will the output visualization results with keypoints be saved in output_dir?

When I try the code, I didn't update the ESPOSE_COCO_PATH, I use a folder with input image for Inference_Path I also changed output_dir.

export Inference_Path=/path/to/your/input_image_folder
  python -m torch.distributed.launch --nproc_per_node=1  main.py \
 --output_dir "logs/coco_r50" \
 -c config/edpose.cfg.py \
 --options batch_size=1 epochs=60 lr_drop=55 num_body_points=17 backbone='resnet50' \
 --dataset_file="coco" \
 --pretrain_model_path "./models/edpose_r50_coco.pth" \
 --eval

However, I got the following error

Traceback (most recent call last):
  File "main.py", line 15, in <module>
    import datasets
  File "/home/jing/Documents/projects/ed-pose/datasets/__init__.py", line 4, in <module>
    from .crowdpose import build as build_crowdpose
  File "/home/jing/Documents/projects/ed-pose/datasets/crowdpose.py", line 12, in <module>
    from crowdposetools.coco import COCO
ModuleNotFoundError: No module named 'crowdposetools'

Thank you!!!!!

@yangjie-cv
Copy link
Collaborator

Hi, you should install crowdposetools following https://github.com/Jeff-sjtu/CrowdPose/tree/master/crowdpose-api.

@github-ping
Copy link

image
我在安装crowdposetools时候遇到了问题,这个要怎么解决呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
-