There is a Research to freely generate human bodies with various body shapes and poses, and a program that runs on Python is distributed (although it is a registration system). We are doing it.
In the README
System Requirements:
====================
Operating system: OSX, Linux
Because it says, Windows is not supposed. That said, I thought it would work, and in the end I was able to run it in my environment (Windows10 64bit), but I heard that I had a lot of trouble.
This was a note wrap personally, but for the time being. I have my own module stored locally, so I need to put it in my PATH. As stated in the README, on Mac at the end of .bash_profile
in your home directory
SMPL_LOCATION=~/smpl
export PYTHONPATH=$PYTHONPATH:$SMPL_LOCATION
Add the letters.
In Windows, you need to set your own by going to Control Panel> User Account> User Account
(Why in such a strange place ...) and "Change Environment Variables".
This was solved in an instant, but it was a trap. Since the statement of the program is Python 2 series, the Python environment to be used must also be 2 series. If the versions are different, the format of the print
statement is different in the first place, and the modules may not be complete before such a trivial problem, so it is extremely rare that it can be executed as it is.
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(…)?
If you get the error, it is highly likely that you are running a 2-series program with 3-series Python.
I need Numpy
, Scipy
, Chumpy
, ʻOpenCV in the README, and of course I will install it with
pip, but the last ʻOpenCV
does not hit. If you execute it as it is, it is said that it is useless if there is no module called cv2
, so you can not try typing with cv2
. In terms of results,
pip install opencv-python
Was the correct answer. Well, it may be common sense in the neighborhood ...
It used to be like an outpost, but now it's a real trap **. If you think that the environment is safe and you want to execute it, you will get the following error.
Traceback (most recent call last):
File "hello_smpl.py", line 48, in <module>
m = load_model( '../../models/basicModel_f_lbs_10_207_0_v1.0.0.pkl' )
File "C:\Users\~~~\smpl\smpl_webuser\serialization.py", line 116, in load_model
dd = ready_arguments(fname_or_dict)
File "C:\Users\~~~\smpl\smpl_webuser\serialization.py", line 80, in ready_arguments
dd = pickle.load(open(fname_or_dict))
EOFError
When I google with ʻEOF Error`, there is a warning that appears when reading an empty file, but the file can be specified properly. Also, the error message is slightly different from the one that appears in the case. Apparently it doesn't really matter if the file is empty or not. I was wondering what this meant for a while, but when I proceeded with the investigation after that,
On Windows, when dealing with binary files in the pickle module, you need to specify that with characters,
It seems that. [(Reference article)](https://ja.stackoverflow.com/questions/18992/python-pickle%E3%81%AE%E3%83%95%E3%82%A1%E3%82%A4%E3 % 83% AB% E3% 83% A2% E3% 83% BC% E3% 83% 89-% E3% 83% 90% E3% 82% A4% E3% 83% 8A% E3% 83% AA% E3% 83% A2% E3% 83% BC% E3% 83% 89% E3% 81% AE% E5% BF% 85% E7% 84% B6% E6% 80% A7)
Specifically, it's in the included serialization.py
dd = pickle.load(open(fname_or_dict))
The sentence
dd = pickle.load(open(fname_or_dict,`rb`))
Must be. Now you can finally do it. At least in my environment.
Later, when I tested it on my MacBook Pro, I didn't see this problem on Mac OS X. Difference in OS …….
When I try to run another sample program, it says that there is no module called ʻopendr. Then I thought I'd do
pip` ... but an error. When I read the error message, I was asked to insert C ++ Compiler, so I entered it and tried again. But,
LINK : warning LNK4044:option'/lstdc++'Is invalid. It will be ignored.
LINK : fatal error LNK1181:Input file'OSMesa.lib'I can't open it.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181
When I search, I find similar cases, but the file in question (ʻOSMesa.lib) is different, so it seems that it cannot be diverted. And if you check this ʻOS Mesa
, you can see that it is a library installed in Linux.
No error when I tried it on a MacBook Pro. It seems that it was a module for displaying the viewer on 3D. But here too, the OS is different ...
There are many differences in versions and OSs ...
Recommended Posts