hf2vad icon indicating copy to clipboard operation
hf2vad copied to clipboard

ValueError: setting an array element with a sequence

Open zw-absin opened this issue 1 year ago • 1 comments

Run the following command: python extract_bboxes.py --proj_root=/data1/zhouwx/hf2vad-master/ --dataset_name=ped2 --mode=train

Problem: Traceback (most recent call last): File "data/hf2vad-master/extract_bboxes.py", line 161, in obj_bboxes_extraction(dataset_root=os.path.join(args.proj_root, "data"), File "/data/hf2vad-master/extract_bboxes.py", line 149, in obj_bboxes_extraction np.save(os.path.join(os.path.join(dataset_root, dataset_name), File "<array_function internals>", line 200, in save File "/data/anaconda3/envs/pytorch1.10/lib/python3.9/site-packages/numpy/lib/npyio.py", line 521, in save arr = np.asanyarray(arr) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2010,) + inhomogeneous part.

Should I change the npyio.py to "arr = np.asanyarray(arr, dtype=object)" to solve this problem?

zw-absin avatar Nov 07 '23 04:11 zw-absin

The problem seems to be solved by changing the code. By the way, can this work detect specific anomalies in the video, like 'video anomaly localization'? For example, how the red bonding boxes in the Fig5 come about? Are they manually marked? Thanks a lot if any body can answer this question!

zw-absin avatar Nov 10 '23 09:11 zw-absin