B-SOID icon indicating copy to clipboard operation
B-SOID copied to clipboard

ValueError: setting an array element with a sequence

Open koosjedr opened this issue 1 year ago • 1 comments

When I try to use the bsoid "load data and preprocess" I get the following error:

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (12,) + inhomogeneous part.

Traceback: File "/Users/koosje/miniconda3/envs/bsoid_v2/lib/python3.9/site-packages/streamlit/script_runner.py", line 332, in _run_script exec(code, module.dict) File "/Users/koosje/Documents/master/onderzoek/B-SOID-master/bsoid_app.py", line 42, in processor.compile_data() File "/Users/koosje/Documents/master/onderzoek/B-SOID-master/bsoid_app/data_preprocess.py", line 113, in compile_data self.raw_input_data, np.array(self.processed_input_data), self.sub_threshold], f

however when I use the demo files I do not get this error. I used my csv pose files from DLC. However when I only upload 1 file in the 041919 folder then it gets processed fine.

Scherm­afbeelding 2024-03-27 om 12 15 03 Scherm­afbeelding 2024-03-27 om 12 15 22 Scherm­afbeelding 2024-03-27 om 12 15 44

Somebody who can help me?

koosjedr avatar Mar 27 '24 11:03 koosjedr

This issue is related to Numpy package

instead this self.raw_input_data, np.array(self.processed_input_data), self.sub_threshold]

try self.raw_input_data, np.array(self.processed_input_data, dtype=object), self.sub_threshold]

abhijeetdhakane avatar Jun 20 '24 20:06 abhijeetdhakane