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

Error: The system cannot find the path specified: './pretrained/results/bvh\\Mousey_m' #14

Open
delebash opened this issue May 25, 2020 · 7 comments

Comments

@delebash
Copy link

delebash commented May 25, 2020

Error when running: sh demo.sh

System:
Windows 10 build 19.09
Python 3.7.7

1)I cloned project and downloaded the Mixamo dataset and placed it in the datasets folder
2) ran sh demo.sh

Error:

loading from epoch 20000......
load succeed!
The syntax of the command is incorrect.
Traceback (most recent call last):
File "eval_single_pair.py", line 99, in
main()
File "eval_single_pair.py", line 93, in main
model.test()
File "D:\Development\deep-motion-editing\retargeting\models\base_model.py", line 96, in test
self.compute_test_result()
File "D:\Development\deep-motion-editing\retargeting\models\architecture.py", line 296, in compute_test_result
self.writer[src][i].write_raw(gt[i, ...], 'quaternion', os.path.join(new_path, '{}_gt.bvh'.format(self.id_test)))
File "D:\Development\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 91, in write_raw
return self.write(rotations, positions, order, path, frametime, root_y=root_y)
File "D:\Development\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 80, in write
return write_bvh(self.parent, offset, rotations_full, positions, self.names, frametime, order, path)
File "D:\Development\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 10, in write_bvh
file = open(path, 'w')
FileNotFoundError: [Errno 2] No such file or directory: './pretrained/results/bvh\Aj\0_gt.bvh'
Traceback (most recent call last):
File "demo.py", line 46, in
example('Aj', 'BigVegas', 'Dancing Running Man.bvh', 'intra', './examples/intra_structure')
File "demo.py", line 42, in example
height)
File "D:\Development\deep-motion-editing\retargeting\models\IK.py", line 57, in fix_foot_contact
anim, name, ftime = BVH.load(input_file)
File "../utils\BVH.py", line 58, in load
f = open(filename, "r")
FileNotFoundError: [Errno 2] No such file or directory: './examples/intra_structure\result.bvh'

Error when running python test.py

loading from epoch 20000......
load succeed!
loading from ./pretrained/models\topology1
loading from epoch 20000......
load succeed!
0%| | 0/106 [00:00<?
he syntax of the command is incorrect.
0%| | 0/106 [00:02<?
Traceback (most recent call last):
File "eval.py", line 37, in
main()
File "eval.py", line 33, in main
model.test()
File "D:\Mocap Software\deep-motion-editing\retargeting\models\base_model.py", line 96, in test
self.compute_test_result()
File "D:\Mocap Software\deep-motion-editing\retargeting\models\architecture.py", line 296, in compute_test_re
self.writer[src][i].write_raw(gt[i, ...], 'quaternion', os.path.join(new_path, '{}_gt.bvh'.format(self.id_t
File "D:\Mocap Software\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 91, in write_raw
return self.write(rotations, positions, order, path, frametime, root_y=root_y)
File "D:\Mocap Software\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 80, in write
return write_bvh(self.parent, offset, rotations_full, positions, self.names, frametime, order, path)
File "D:\Mocap Software\deep-motion-editing\retargeting\datasets\bvh_writer.py", line 10, in write_bvh
file = open(path, 'w')
FileNotFoundError: [Errno 2] No such file or directory: './pretrained/results/bvh\BigVegas\0_gt.bvh'
Collecting test error...
Traceback (most recent call last):
File "test.py", line 35, in
cross_error += full_batch(0)
File "D:\Mocap Software\deep-motion-editing\retargeting\get_error.py", line 15, in full_batch
res.append(batch(char, suffix))
File "D:\Mocap Software\deep-motion-editing\retargeting\get_error.py", line 31, in batch
files = [f for f in os.listdir(new_p) if
FileNotFoundError: [WinError 3] The system cannot find the path specified: './pretrained/results/bvh\Mousey_m'

I have been looking for a project like this. There are many excellent projects out there that output 2D points such as OpenPose but not many that do the conversion to 3D. The ones I didn't really work well. I am excited about this project since it is specifically what I am looking for.

Thanks,
Dan

@delebash
Copy link
Author

My fault. The error was that I had not downloaded and installed the datasets files.

@gemlongman
Copy link

I have a similar question :
datasets have been downloaded:

image

cmd : python eval_single_pair.py --input_bvh=./datasets/Mixamo/Aj/Dancing_Running_Man.bvh --target_bvh=./datasets/Mixamo/BigVegas/Dancing_Running_Man.bvh --output_filename=./examples/intra_structure/result.bvh --test_type=intra
loading from ./pretrained/models/topology0
loading from epoch 20000......
load succeed!
loading from ./pretrained/models/topology1
loading from epoch 20000......
load succeed!
Traceback (most recent call last):
File "demo.py", line 47, in
example('Aj', 'BigVegas', 'Dancing Running Man.bvh', 'intra', './examples/intra_structure')
File "demo.py", line 43, in example
height)
File "/data/gemhygao/code/deep-motion-editing/retargeting/models/IK.py", line 57, in fix_foot_contact
anim, name, ftime = BVH.load(input_file)
File "../utils/BVH.py", line 58, in load
f = open(filename, "r")
FileNotFoundError: [Errno 2] No such file or directory: './examples/intra_structure/result.bvh'

@gemlongman
Copy link

my problem fixed by
conda install pytorch torchvision cpuonly -c pytorch

@delebash
Copy link
Author

delebash commented Jun 1, 2020

@gemlongman

I had this problem originally and if I remember correctly this was also a path issue. I will look at my project

@delebash delebash reopened this Jun 1, 2020
@gemlongman
Copy link

maybe you should run it on a Linux

@delebash
Copy link
Author

delebash commented Jun 1, 2020

My fork with changes for Windows 10

delebash@875f5d7

In file retargeting/eval_single_pair.py

Replace this line

args.output_filename = recover_space(args.output_filename)

with

args.output_filename = args.output_filename

# Windows 10 fix
# args.output_filename = recover_space(args.output_filename) -- recover_space removes underline in 'examples/intra_structure' and replaces it with a space 'examples/iintra structure' resulting in bad path 

Next in file retargeting/option_parser.py

Replace this line

  `  os.system('mkdir -p {}'.format(path))`

with this

   os`.makedirs(path)`

Change is located in

def try_mkdir(path):
    import os	    import os
    if not os.path.exists(path):	    if not os.path.exists(path):
        os.system('mkdir -p {}'.format(path))	        # Windows 10 fix
        # os.system('mkdir -p {}'.format(path))  -- does not work in windows 10 fails to make directory
        os.makedirs(path)

@noshaba
Copy link

noshaba commented Nov 5, 2021

In addition to what @delebash said, also replace

os.system('cp "{}/{}/0_{}.bvh" "./{}"'.format(model.bvh_path, output_character_name, src_id, output_filename))

with

os.system('copy /Y "{}\\{}\\0_{}.bvh" "{}"'.format(model.bvh_path, output_character_name, src_id, output_filename))

in the file eval_single_pair.py and change the .sh files to .bat, and the project runs on Windows 10 natively without requiring PowerShell or Git Bash.

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