Closed johndpope closed 2 months ago
@johndpope no pose checkpoint path is provided. Please follow the instructions here: https://github.com/facebookresearch/sapiens/blob/main/lite/docs/POSE_README.md
that code is designed to bulk extract poses - in my use case is - i have a body pose (using the pose gradio demo on huggingface) - how can i correctly parse it and save it back to an image ?
did you consider using omegaconf / yaml files to keep config stuff in one place? the shell scripts are hard coding the directory paths everywhere to your local directories it maybe ok once or twice - they're everywhere https://github.com/johndpope/IMF/blob/main/config.yaml
fyi - this is what i was hoping to achieve in this repo - https://github.com/johndpope/EAI/blob/main/pose_vis.py
python pose_vis.py '/home/oem/Desktop/image_1.png' test.png output.json
just input the image - get the output (body json / output.png)
-obviously i cherry pick the example pose from huggingface https://huggingface.co/spaces/facebook/sapiens-pose/tree/main
@johndpope there is no script to visualize the json as input in this repository - no documentation points to this.
You are on the right track to use the hugging-face pose-space code as a reference. If you got the json from the demo, you also get the keypoint visualized image in the demo as well which you can download directly.
background: I have one single body json pose - i want to visualize it how can i do this?
i clone the huggingface repo - 30gb
then i get error above
when i specify the pth i get this error.
python lite/demo/vis_pose.py --input='/home/oem/Desktop/image_3.png' --output-root . '/media/oem/12TB/sapiens/pretrain/sapiens_host/pose/checkpoints/sapiens_1b/sapiens_1b_goliath_best_goliath_AP_640.pth' /home/oem/miniconda3/envs/comfyui/lib/python3.11/site-packages/mmengine/optim/optimizer/zero_optimizer.py:11: DeprecationWarning:
TorchScriptsupport for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the
torch.compileoptimizer instead. from torch.distributed.optim import \ /home/oem/miniconda3/envs/comfyui/lib/python3.11/site-packages/albumentations/check_version.py:49: UserWarning: Error fetching version info The read operation timed out data = fetch_version_info() Traceback (most recent call last): File "/media/oem/12TB/sapiens/lite/demo/vis_pose.py", line 459, in <module> main() File "/media/oem/12TB/sapiens/lite/demo/vis_pose.py", line 294, in main pose_estimator = load_model(args.pose_checkpoint, USE_TORCHSCRIPT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/media/oem/12TB/sapiens/lite/demo/vis_pose.py", line 173, in load_model return torch.export.load(checkpoint).module() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/oem/miniconda3/envs/comfyui/lib/python3.11/site-packages/torch/export/__init__.py", line 300, in load return load( ^^^^^ File "/home/oem/miniconda3/envs/comfyui/lib/python3.11/site-packages/torch/_export/__init__.py", line 284, in load version = zipf.read('version').decode().split('.') ^^^^^^^^^^^^^^^^^^^^ File "/home/oem/miniconda3/envs/comfyui/lib/python3.11/zipfile.py", line 1510, in read with self.open(name, "r", pwd) as fp: ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/oem/miniconda3/envs/comfyui/lib/python3.11/zipfile.py", line 1547, in open zinfo = self.getinfo(name) ^^^^^^^^^^^^^^^^^^ File "/home/oem/miniconda3/envs/comfyui/lib/python3.11/zipfile.py", line 1476, in getinfo raise KeyError( KeyError: "There is no item named 'version' in the archive"