Open simonlisss opened 3 years ago
1
Scaling images of: 0.75
1
Scaling images of: 0.75
1
Scaling images of: 0.75
1
Scaling images of: 0.75
1
Scaling images of: 0.75
/home/lisicheng/smalr/src/smalr/mycore/io.py:58: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tup
les-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray.
v_ids = np.array([np.atleast_1d(v) - 1 for v in v_ids])
2.13e+04 | cam: 2.13e+04 | cam_t: 0.00e+00
Traceback (most recent call last):
File "run_on_animals.py", line 96, in
I tried to fix it but the code gave me another error, could you tell me what cause these issues?
Hi,
Look at here
IS = np.repeat(np.arange(int(self.v.r.size*2/3))) File "
", line 4, in repeat TypeError: _repeat_dispatcher() missing 1 required positional argument: 'repeats'
I think you should have IS = np.repeat(np.arange(int(self.v.r.size*2/3)), 3)
On 21. Sep 2021, at 10:29, simonlisss @.***> wrote:
1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 /home/lisicheng/smalr/src/smalr/mycore/io.py:58: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tup les-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. v_ids = np.array([np.atleast_1d(v) - 1 for v in v_ids]) 2.13e+04 | cam: 2.13e+04 | cam_t: 0.00e+00 Traceback (most recent call last): File "run_on_animals.py", line 96, in compute_clips(family, model_name, shape_data_name, base_dirs, save_base_dir, File "/home/lisicheng/smalr/src/smalr/compute_clips.py", line 326, in compute_clips bodys = compute_multiple_unsynch_frames_from_annotations(bodys, bodys_imgs, model, File "/home/lisicheng/smalr/src/smalr/compute_clips.py", line 99, in compute_multiple_unsynch_frames_from_annotations model, keypoints[ic], keyvids[ic], , landmarks[ic], landmarks_names[ic] = get_annotation( File "/home/lisicheng/smalr/src/smalr/track_frame_fit.py", line 77, in get_annotation rot, trans = estimate_global_pose(landmarks, keypoint_vids, model, cam, img, viz=viz) File "/home/lisicheng/smalr/src/smalr/estimate_global_pose.py", line 146, in estimate_global_pose ch.minimize( obj, x0=free_variables, method='dogleg', callback=on_step, options={'maxiter': 100, 'e_3': .0001}) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization.py", line 41, in minimize return minimize_dogleg(fun, free_variables=x0, on_step=callback, *options) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 408, in minimize_dogleg state.updateJ(obj) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 304, in updateJ self.J = obj.J File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 105, in J result = self.dr_wrt(self.x, profiler=self.profiler).copy() File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 50, in dr_wrt new_jac = self.obj.dr_wrt(freevar, profiler=profiler) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt dr2 = p.dr_wrt(wrt, profiler=profiler) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt dr2 = p.dr_wrt(wrt, profiler=profiler) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt dr2 = p.dr_wrt(wrt, profiler=profiler) [Previous line repeated 1 more time] File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 775, in dr_wrt indirect_dr = self.compute_rop(p, rhs=dr2) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 724, in compute_rop dr = self._compute_dr_wrt_sliced(wrt) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 289, in _compute_dr_wrt_sliced result = self.compute_dr_wrt(wrt) File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/opendr-0.77-py3.8-linux-x86_64.egg/opendr/camera.py", line 102, in compute_dr_wrt IS = np.repeat(np.arange(int(self.v.r.size2/3))) File "
", line 4, in repeat TypeError: _repeat_dispatcher() missing 1 required positional argument: 'repeats' I tried to fix it but the code gave me another error, could you tell me what cause these issues?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/silviazuffi/smalr_online/issues/5#issuecomment-923757006, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNYVFKVKYGQ7CMCCGP3OJTUDA663ANCNFSM5ENYAGKA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hello, I have the problem shown in follow, I think I followed by the instructions of README completely. I have no idea how to fix it, could u please give me some hints? BTW, I have got a figure of key points of test image.
1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 1 Scaling images of: 0.75 /home/lisicheng/smalr/src/smalr/mycore/io.py:58: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray. v_ids = np.array([np.atleast_1d(v) - 1 for v in v_ids]) 2.13e+04 | cam: 2.13e+04 | cam_t: 0.00e+00 Traceback (most recent call last): File "/home/lisicheng/smalr/src/smalr/run_on_animals.py", line 96, in
compute_clips(family, model_name, shape_data_name, base_dirs, save_base_dir,
File "/home/lisicheng/smalr/src/smalr/compute_clips.py", line 326, in compute_clips
bodys = compute_multiple_unsynch_frames_from_annotations(bodys, bodys_imgs, model,
File "/home/lisicheng/smalr/src/smalr/compute_clips.py", line 99, in compute_multiple_unsynch_frames_from_annotations
model, keypoints[ic], keyvids[ic], , landmarks[ic], landmarks_names[ic] = get_annotation(
File "/home/lisicheng/smalr/src/smalr/track_frame_fit.py", line 77, in get_annotation
rot, trans = estimate_global_pose(landmarks, keypoint_vids, model, cam, img, viz=viz)
File "/home/lisicheng/smalr/src/smalr/estimate_global_pose.py", line 146, in estimate_global_pose
ch.minimize( obj, x0=free_variables, method='dogleg', callback=on_step, options={'maxiter': 100, 'e_3': .0001})
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization.py", line 41, in minimize
return minimize_dogleg(fun, free_variables=x0, on_step=callback, **options)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 408, in minimize_dogleg
state.updateJ(obj)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 304, in updateJ
self.J = obj.J
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 105, in J
result = self.dr_wrt(self.x, profiler=self.profiler).copy()
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/optimization_internal.py", line 50, in dr_wrt
new_jac = self.obj.dr_wrt(freevar, profiler=profiler)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt
dr2 = p.dr_wrt(wrt, profiler=profiler)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt
dr2 = p.dr_wrt(wrt, profiler=profiler)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 772, in dr_wrt
dr2 = p.dr_wrt(wrt, profiler=profiler)
[Previous line repeated 1 more time]
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 775, in dr_wrt
indirect_dr = self.compute_rop(p, rhs=dr2)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 724, in compute_rop
dr = self._compute_dr_wrt_sliced(wrt)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/chumpy/ch.py", line 289, in _compute_dr_wrt_sliced
result = self.compute_dr_wrt(wrt)
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/opendr-0.77-py3.8-linux-x86_64.egg/opendr/camera.py", line 104, in compute_dr_wrt
result = sp.csc_matrix((data, (IS, JS)))
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/scipy/sparse/compressed.py", line 54, in init
other = self.class(coo_matrix(arg1, shape=shape,
File "/home/lisicheng/anaconda3/envs/smalr/lib/python3.8/site-packages/scipy/sparse/coo.py", line 147, in init
raise ValueError('cannot infer dimensions from zero '
ValueError: cannot infer dimensions from zero sized index arrays
Process finished with exit code 1