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

AttributeError: 'Struct' object has no attribute 'hands_componentsl' #66

Open
Zhiying-Li-dot opened this issue Jul 1, 2024 · 1 comment
Assignees

Comments

@Zhiying-Li-dot
Copy link

When I perform the command "sh slurm_inference.sh test_video mp4 24 smpler_x_h32" which use python command
python inference.py \ --num_gpus ${GPUS_PER_NODE} \ --exp_name output/demo_${JOB_NAME} \ --pretrained_model ${CKPT} \ --agora_benchmark agora_model \ --img_path ${IMG_PATH} \ --start 1 \ --end $end_count \ --output_folder ${SAVE_DIR} \ --show_verts \ --show_bbox \ --save_mesh \
, the fault is persent.

`Traceback (most recent call last):
File "inference.py", line 188, in
main()
File "inference.py", line 55, in main
from base import Demoer
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/base.py", line 11, in
from SMPLer_X import get_model
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../main/SMPLer_X.py", line 4, in
from nets.smpler_x import PositionNet, HandRotationNet, FaceRegressor, BoxNet, HandRoI, BodyRotationNet
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/nets/smpler_x.py", line 6, in
from utils.human_models import smpl_x
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/utils/human_models.py", line 175, in
smpl_x = SMPLX()
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/utils/human_models.py", line 11, in init
self.layer = {'neutral': smplx.create(cfg.human_model_path, 'smplx', gender='NEUTRAL', use_pca=False, use_face_contour=True, **self.layer_arg),
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/utils/smplx/smplx/body_models.py", line 2325, in create
return SMPLX(model_path, **kwargs)
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/utils/smplx/smplx/body_models.py", line 914, in init
super(SMPLX, self).init(
File "/data/zyli/3Dmesh_attack/SMPLer-X/main/../common/utils/smplx/smplx/body_models.py", line 579, in init
left_hand_components = data_struct.hands_componentsl[:num_pca_comps]
AttributeError: 'Struct' object has no attribute 'hands_componentsl'

  • ffmpeg -y -f image2 -r 24 -i ../demo/results/test_video/img/%06d.jpg -vcodec mjpeg -qscale 0 -pix_fmt yuv420p ../demo/results/test_video.mp4
    ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
    configuration: --prefix=/opt/conda/conda-bld/ffmpeg_1597178665428/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
    libavutil 56. 51.100 / 56. 51.100
    libavcodec 58. 91.100 / 58. 91.100
    libavformat 58. 45.100 / 58. 45.100
    libavdevice 58. 10.100 / 58. 10.100
    libavfilter 7. 85.100 / 7. 85.100
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 7.100 / 5. 7.100
    libswresample 3. 7.100 / 3. 7.100
    [image2 @ 0x559bb4687cc0] Could find no file with path '../demo/results/test_video/img/%06d.jpg' and index in the range 0-4
    ../demo/results/test_video/img/%06d.jpg: No such file or directory`
    Please help me, how to solve this problem.
@Zhiying-Li-dot
Copy link
Author

When I perform the command "sh slurm_inference.sh test_video mp4 24 smpler_x_h32" which use the orginal code PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ srun -p ${PARTITION} \ --job-name=${JOB_NAME} \ --gres=gpu:${GPUS_PER_NODE} \ --ntasks=${GPUS} \ --ntasks-per-node=${GPUS_PER_NODE} \ --cpus-per-task=${CPUS_PER_TASK} \ --kill-on-bad-exit=1 \ ${SRUN_ARGS} \,
there also are the faults.
`ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
configuration: --prefix=/opt/conda/conda-bld/ffmpeg_1597178665428/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../demo/videos/test_video.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf59.27.100
Duration: 00:00:10.00, start: 0.000000, bitrate: 3431 kb/s
Stream #0:0(und): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1080x1920 [SAR 1:1 DAR 9:16], 3430 kb/s, 24 fps, 24 tbr, 12288 tbn, 24 tbc (default)
Metadata:
handler_name : VideoHandler
Please use -q:a or -q:v, -qscale is ambiguous
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[swscaler @ 0x5584aac13780] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to '../demo/images/test_video/%06d.jpg':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2mp41
encoder : Lavf58.45.100
Stream #0:0(und): Video: mjpeg, yuvj420p(pc), 1080x1920 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc58.91.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame= 240 fps=155 q=0.0 Lsize=N/A time=00:00:10.00 bitrate=N/A speed=6.44x
video:34968kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

  • find ../demo/images/test_video -type f
  • wc -l
  • end_count=240
  • echo 240
    240
  • dirname slurm_inference.sh
  • PYTHONPATH=./..: srun -p Zoetrope --job-name=inference_test_video --gres=gpu:1 --ntasks=1 --ntasks-per-node=1 --cpus-per-task=4 --kill-on-bad-exit=1
    slurm_inference.sh: 34: srun: not found
  • ffmpeg -y -f image2 -r 24 -i ../demo/results/test_video/img/%06d.jpg -vcodec mjpeg -qscale 0 -pix_fmt yuv420p ../demo/results/test_video.mp4
    ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
    built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
    configuration: --prefix=/opt/conda/conda-bld/ffmpeg_1597178665428/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
    libavutil 56. 51.100 / 56. 51.100
    libavcodec 58. 91.100 / 58. 91.100
    libavformat 58. 45.100 / 58. 45.100
    libavdevice 58. 10.100 / 58. 10.100
    libavfilter 7. 85.100 / 7. 85.100
    libavresample 4. 0. 0 / 4. 0. 0
    libswscale 5. 7.100 / 5. 7.100
    libswresample 3. 7.100 / 3. 7.100`.
    Please help me, I don't know how to do.
    Thanks a lot.

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