keras_Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
keras_Realtime_Multi-Person_Pose_Estimation copied to clipboard

error running generate_hdf5

Open xjoshramos opened this issue 8 years ago • 14 comments

('Image ID ', 90108) ('Image ID ', 179112) ('Image ID ', 311295) ('Num samples ', 55242) Traceback (most recent call last): File "generate_hdf5.py", line 323, in writeHDF5() File "generate_hdf5.py", line 220, in writeHDF5 meta_data[clidx][i] = long(height_binary[i]) ValueError: invalid literal for long() with base 10: ''

xjoshramos avatar Oct 18 '17 00:10 xjoshramos

@xjoshramos Hi, how did you get mask_miss and mask_all imgs? I want to transfer this model to a new dataset which has 14kepoints for a person, I need to generate mask_miss and mask_all images to retrain the model

Marcovaldong avatar Oct 18 '17 03:10 Marcovaldong

Generate_mask.py script in the training folder. Are you able to run the hdf5 script for preaparing the data?

xjoshramos avatar Oct 18 '17 08:10 xjoshramos

I got the same error, and I don't understand what does the function float2bytes for. I did ignore the generate_mask.py. Now I'm trying to transfer the model to a new dataset, and the annotation doesn't have segmentation, do you know how should I deal with the mask_miss and mask_all matrix.

Marcovaldong avatar Oct 18 '17 12:10 Marcovaldong

@xjoshramos This error occurs on python 2.x Try to tun the script under python 3.5

michalfaber avatar Oct 19 '17 04:10 michalfaber

000000000139 mask_all_000000000139 mask_miss_000000000139

xjoshramos avatar Oct 20 '17 22:10 xjoshramos

mask_all, mask_miss Its used in the loss function because not every person is annotated inside the coco set.

xjoshramos avatar Oct 20 '17 22:10 xjoshramos

Hi, I encountered an error while using Python3.5, I have passed the step 'python3 setup.py install' , but when I do 'from pycocotools.coco import COCO' ", the error '_mask.so: undefined symbol: _Py_ZeroStruct ' came out, would you like to help me solve the problem

GaogaoT avatar Nov 01 '17 13:11 GaogaoT

@michalfaber Is it possible to fix the error: ValueError: invalid literal for long() with base 10: '' in Python2?

andrehuang avatar Dec 02 '17 23:12 andrehuang

@GaogaoT you have several pythons installed and they mixed libraries, use vitrualenv or conda and install/compile everything with one version of python

anatolix avatar Dec 03 '17 18:12 anatolix

@GaogaoT You may want to rebuild your coco api using python3.x

  1. go to coco/PythonAPI
  2. Setup your coco api using sudo python3 setup.py build_ext --inplace under coco/PythonAPI
  3. Then, go back to the training folder and run python3 generate_hdf5.py

kevinlin311tw avatar Dec 18 '17 01:12 kevinlin311tw

@GaogaoT, I tried what @kevinlin311tw suggested above, but didn't work. So I did the setup again like $ python setup.py install

GuruMulay avatar Feb 09 '18 22:02 GuruMulay

Tried running the script in python 2.7 and got the same error as @xjoshramos :

('Image ID ', 90108) ('Image ID ', 179112) ('Image ID ', 311295) ('Num samples ', 55242) Traceback (most recent call last): File "generate_hdf5.py", line 323, in writeHDF5() File "generate_hdf5.py", line 220, in writeHDF5 meta_data[clidx][i] = long(height_binary[i]) ValueError: invalid literal for long() with base 10: ''

Tried running in Python 3.5 from a virtual env. The code throws this error, same as @GaogaoT :

File "generate_hdf5.py", line 4, in from pycocotools.coco import COCO File "/opt/anaconda/miniconda2/envs/py35/lib/python3.5/site-packages/pycocotools/coco.py", line 55, in from . import mask as maskUtils File "/opt/anaconda/miniconda2/envs/py35/lib/python3.5/site-packages/pycocotools/mask.py", line 3, in import pycocotools._mask as _mask ImportError: /opt/anaconda/miniconda2/envs/py35/lib/python3.5/site-packages/pycocotools/_mask.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyFPE_jbuf

Did anyone solve this issue?

cchamber avatar Feb 19 '18 22:02 cchamber

Tried running the script in python 3.5 and got the same error as @xjoshramos ('Image ID ', 90108) ('Image ID ', 179112) ('Image ID ', 311295) ('Value of count:', 55242) ('Num samples ', 55242) Traceback (most recent call last): File "/Users/abi/PycharmProjects/Pose estimation Keras/training/generate_hdf5.py", line 326, in writeHDF5() File "/Users/abi/PycharmProjects/Pose estimation Keras/training/generate_hdf5.py", line 233, in writeHDF5 meta_data[clidx][i] = height_binary[i] ValueError: invalid literal for long() with base 10: ''

Process finished with exit code 1

I am trying hard to find a fix. Till now couldn't find any.

abinjoabraham avatar Apr 11 '18 10:04 abinjoabraham

New update

Upgraded my python environment in my mac to py3.6 using miniconda packages and now this program is running without any errors. However the training dataset which is formed is so huge in size and my storage got full during the runtime. @michalfaber is there any way that I can limit the number of samples. Sorry if this question is too stupid. Also I have a doubt like each of the sample which is referred in the program is each of the images information only right ??

abinjoabraham avatar Apr 13 '18 09:04 abinjoabraham