Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: setting an array element with a sequence #35

Open
zw-absin opened this issue Nov 7, 2023 · 1 comment
Open

ValueError: setting an array element with a sequence #35

zw-absin opened this issue Nov 7, 2023 · 1 comment

Comments

@zw-absin
Copy link

zw-absin commented Nov 7, 2023

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
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant