zju3dv / EasyMocap

Make human motion capture easier.
Other
3.43k stars 439 forks source link

Monocular Videos issue ([WinError 3] The system cannot find the path specified: '...\\output-smpl-3d\\smplmesh) #375

Open danzelus opened 8 months ago

danzelus commented 8 months ago

Please help me with this! what i did (windows)

conda create -n easymocap python=3.9 -y
conda activate easymocap
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
python -m pip install -r requirements.txt
conda install ffmpeg
python -m pip install pyrender
python setup.py develop --user

Then i create this folders - C:\Users\user\EasyMocap\0_input\vky\videos and i place my own video to it Next i run this: python scripts/preprocess/extract_video.py 0_input\vky --no2d

But instead working like on the video (progress bar) vid I get this my

Next i run

python apps/preprocess/extract_keypoints.py 0_input/vky --mode yolo-hrnet
testEasyMocap1: 100%|████████████████████████████████████████████████████████████████| 660/660 [08:01<00:00,  1.37it/s]

Next: python apps/demo/mocap.py 0_input/vky --work internet --ranges 1 500 1 And i get a error

...
no handl2d in 0_input/vky\images\testEasyMocap1\000498.jpg
no handr2d in 0_input/vky\images\testEasyMocap1\000498.jpg
no handl2d in 0_input/vky\images\testEasyMocap1\000499.jpg
no handr2d in 0_input/vky\images\testEasyMocap1\000499.jpg
Loading testEasyMocap1: 100%|███████████████████████████████████████████████████████| 499/499 [00:00<00:00, 659.59it/s]
[Info] Load dist with shape (1, 5)
[Info] Load Tc with shape (3, 1)
[Info] Load K with shape (3, 3)
[Info] Load RT with shape (3, 4)
[Info] Load KRT with shape (3, 4)
[Info] Load Rc with shape (3, 3)
C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torchvision\models\_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
  warnings.warn(
C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torchvision\models\_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.
  warnings.warn(msg)
Traceback (most recent call last):
  File "C:\Users\user\EasyMocap\apps\fit\fit.py", line 38, in <module>
    fitter.fit(body_model, dataset)
  File "c:\users\user\easymocap\easymocap\multistage\base.py", line 296, in fit
    body_params, infos = self.fit_data(data, body_model)
  File "c:\users\user\easymocap\easymocap\multistage\base.py", line 263, in fit_data
    init_module = load_object(init_func.module, init_func.args)
  File "c:\users\user\easymocap\easymocap\config\baseconfig.py", line 67, in load_object
    obj = getattr(module, name)(**extra_args, **module_args)
  File "c:\users\user\easymocap\easymocap\multistage\init_cnn.py", line 27, in __init__
    self.spin_model = SPIN(
  File "c:\users\user\easymocap\easymocap\estimator\SPIN\spin_api.py", line 270, in __init__
    checkpoint = torch.load(checkpoint)
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 1028, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 1256, in _legacy_load
    result = unpickler.load()
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 1193, in persistent_load
    wrap_storage=restore_location(obj, location),
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 381, in default_restore_location
    result = fn(storage, location)
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 274, in _cuda_deserialize
    device = validate_cuda_device(location)
  File "C:\Users\user\anaconda3\envs\easymocap\lib\site-packages\torch\serialization.py", line 258, in validate_cuda_device
    raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Traceback (most recent call last):
  File "C:\Users\user\EasyMocap\apps\demo\mocap.py", line 394, in <module>
    workflow(args.work, args)
  File "C:\Users\user\EasyMocap\apps\demo\mocap.py", line 340, in workflow
    append_mocap_flags(path, output, cfg_data, cfg_model, cfg_exp, workflow.fit, args)
  File "C:\Users\user\EasyMocap\apps\demo\mocap.py", line 277, in append_mocap_flags
    filenames = os.listdir(outdir)
FileNotFoundError: [WinError 3] The system cannot find the path specified: '0_input/vky\\output-smpl-3d\\smplmesh'

But i have models

models

danzelus commented 8 months ago

If i run python apps/demo/mocap.py 0_input/vky --mode mono-smpl --ranges 1 1200 1 --fps 24 I get error also

Images not found in 0_input/vky
[run] python apps/preprocess/extract_image.py 0_input/vky
[run] python apps/fit/triangulate1p.py --cfg_data config/recon/mv1p.yml --opt_data args.path 0_input/vky args.out 0_input/vky\output-keypoints3d args.ranges 1,1200,1 --cfg_exp config/recon/mv1p-total.yml --opt_exp  args.debug False
[Info] Load 1 folders: testEasyMocap1...
-> [Loading config/recon/mv1p.yml]:  12.5ms
Traceback (most recent call last):
  File "C:\Users\user\EasyMocap\apps\fit\triangulate1p.py", line 95, in <module>
    dataset = load_object(cfg_data.module, cfg_data.args)
  File "c:\users\user\easymocap\easymocap\config\baseconfig.py", line 67, in load_object
    obj = getattr(module, name)(**extra_args, **module_args)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 586, in __init__
    super().__init__(*args, **kwargs)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 403, in __init__
    super().__init__(**kwargs)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 229, in __init__
    self.image_names = get_allname(self.root, self.subs, self.ranges, **reader.image)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 47, in get_allname
    raise ValueError('The number of images in {} is less than the range: {} vs {}'.format(join(root0, root, sub), len(imgnames), _ranges[1]))
ValueError: The number of images in 0_input/vky\images\testEasyMocap1 is less than the range: 660 vs 1200
[run] python -m easymocap.visualize.ffmpeg_wrapper 0_input/vky\output-keypoints3d/match --fps 50
[ffmpeg] No images in folder 0_input/vky\output-keypoints3d/match
python apps/fit/fit.py --cfg_model config/model/smpl.yml --cfg_data config/data/multivideo.yml --cfg_exp config/fit/1v1p.yml --opt_data "args.path" "${data}" "args.out" "${output}" "args.camera" "${data}" "args.ranges" "1,1200,1" --opt_exp "args.monitor.printloss" "True"
[run] python apps/fit/fit.py --cfg_model config/model/smpl.yml --cfg_data config/data/multivideo.yml --cfg_exp config/fit/1v1p.yml --opt_data "args.path" "0_input/vky" "args.out" "0_input/vky\output-output-smpl-3d" "args.camera" "0_input/vky" "args.ranges" "1,1200,1" --opt_exp "args.monitor.printloss" "True"
Key is not in the template: args.out
[Info] Load 1 folders: testEasyMocap1...
[Info] Load [1, 1200, 1] frames
-> [Loading config/data/multivideo.yml]:  16.9ms
Traceback (most recent call last):
  File "C:\Users\user\EasyMocap\apps\fit\fit.py", line 33, in <module>
    dataset = load_object(cfg_data.module, cfg_data.args)
  File "c:\users\user\easymocap\easymocap\config\baseconfig.py", line 67, in load_object
    obj = getattr(module, name)(**extra_args, **module_args)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 518, in __init__
    super().__init__(**kwargs)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 403, in __init__
    super().__init__(**kwargs)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 229, in __init__
    self.image_names = get_allname(self.root, self.subs, self.ranges, **reader.image)
  File "c:\users\user\easymocap\easymocap\datasets\base.py", line 47, in get_allname
    raise ValueError('The number of images in {} is less than the range: {} vs {}'.format(join(root0, root, sub), len(imgnames), _ranges[1]))
ValueError: The number of images in 0_input/vky\images\testEasyMocap1 is less than the range: 660 vs 1200
[run] python -m easymocap.visualize.ffmpeg_wrapper 0_input/vky/output-output-smpl-3d/smplmesh --fps 50
[ffmpeg] No images in folder 0_input/vky/output-output-smpl-3d/smplmesh