Closed monacv closed 3 years ago
(djrn) [jalal@goku DJ-RN]$ python script/generate_3D_obj_GT.py --smplx_path ../../data/smplify-x/models_smplx_v1_1/models/smplx/ --res ../../data/smplify-x/ride_bike/step6_train/ --img_path ../../data/smplify-x/ride_bike/step6_data/images --save_obj_path ../../data/smplify-x/ride_bike/step6_obj
37633
../../data/smplify-x/ride_bike/step6_train/results/HICO_train2015_00004909/000.pkl
../../data/smplify-x/ride_bike/step6_train/results/HICO_train2015_00004909/001.pkl
Traceback (most recent call last):
File "script/generate_3D_obj_GT.py", line 95, in <module>
otri, obj_vertexs = get_param(result, hbox, obox, htri, img, radius, gamma_min, gamma_max)
File "/scratch3/research/code/DJ-RN/script/generate_utils.py", line 371, in get_param
if (((y2D >= obox[1]) & (y2D <= obox[3])) | ((y2D <= obox[1]) & (y2D >= obox[3]))):
File "/scratch3/venv/djrn/lib/python3.8/site-packages/sympy/core/expr.py", line 393, in __ge__
return self._cmp(other, ">=", GreaterThan)
File "/scratch3/venv/djrn/lib/python3.8/site-packages/sympy/core/expr.py", line 346, in _cmp
raise TypeError("Invalid comparison of non-real %s" % me)
TypeError: Invalid comparison of non-real 1.05147176800692e-6 + 3.72470439655723*I
Should I use try except phrase for faulty pkl files that result in imaginary y2d or are we supposed not to have any imaginary y2d?
below I handled the imaginary y2d for 001.pkl using try-except block.
(djrn) [jalal@goku DJ-RN-dawnlight]$ python script/generate_3D_obj_GT.py --smplx_path ../../data/smplify-x/models_smplx_v1_1/models/smplx/ --res ../../data/smplify-x/ride_bike/step6_train/ --img_path ../../data/smplify-x/ride_bike/step6_data/images --save_obj_path ../../data/smplify-x/ride_bike/step6_obj
37633
../../data/smplify-x/ride_bike/step6_train/results/HICO_train2015_00004909/000.pkl
y2d 39.9603816459773, obox [9, -85, 93, 5]
y2d -39.9603816587270, obox [9, -85, 93, 5]
y2d 49.9684719529012, obox [9, -85, 93, 5]
y2d -49.9684719656511, obox [9, -85, 93, 5]
../../data/smplify-x/ride_bike/step6_train/results/HICO_train2015_00004909/001.pkl
y2d 1.05147176800692e-6 + 3.72470439655723*I, obox [-231, -89, -138, 89]
error is: Invalid comparison of non-real 1.05147176800692e-6 + 3.72470439655723*I
error is: cannot unpack non-iterable NoneType object
../../data/smplify-x/ride_bike/step6_train/results/HICO_train2015_00004909/002.pkl
y2d 103.363661335838, obox [82, -99, 226, 306]
y2d -103.363663539056, obox [82, -99, 226, 306]
y2d 509.681775874619, obox [82, -99, 226, 306]
y2d -509.681778088770, obox [82, -99, 226, 306]
Would you mind provide all the y2d generated for HICO_train2015_00004909/001.pkl
?
According to the error, discarding all the imaginary values of y2d before comparison might help.
Do you know why this error happens and how I could fix it?
$ python script/generate_3D_obj_GT.py --smplx_path ../../data/smplify-x/models_smplx_v1_1/models/smplx/ --res ../../data/smplify-x/ride_bike/ride_bike_train/ --img_path ../../data/smplify-x/ride_bike/train_data_ride_bike/images/ --save_obj_path ../../data/smplify-x/ride_bike/objs
Error is: