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

Error Running Code with UBNORMAL and STC Datasets #16

Closed
iammehdii opened this issue Aug 25, 2024 · 2 comments
Closed

Error Running Code with UBNORMAL and STC Datasets #16

iammehdii opened this issue Aug 25, 2024 · 2 comments

Comments

@iammehdii
Copy link

I am experiencing an issue when trying to run the code with the UBNORMAL and STC datasets, using the provided config.yaml file and pre-trained checkpoint. The problem occurs in the post_processing function of the mocodad.py file.

Error:

In the post_processing function, the code loops over different transforms. However, in some cases, the cond_transform variable is an array of all False values. This causes the filter_vectors_by_cond function to return empty arrays for out_transform, gt_data_transform, meta_transform, and frames_transform.

As a result, the figs_ids variable, which is calculated as sorted(list(set(meta_scene_clip[:, 2]))), is also empty. This causes an error when trying to loop over figs_ids and append elements to the error_per_person list.

Finally, when trying to execute the line clip_score = np.stack(error_per_person, axis=0), an error occurs because error_per_person is an empty list.

Steps to Reproduce:

Run the code with the UBNORMAL and STC datasets, using the provided config.yaml file and pre-trained checkpoint.
The error should occur in the post_processing function of the mocodad.py file.

The code produces an error when trying to execute the line clip_score = np.stack(error_per_person, axis=0), due to error_per_person being an empty list.:
ValueError: need at least one array to stack

@aleflabo
Copy link
Owner

Hi!

This error seems similar to the one in the issue here: #4 (comment)

Is the use_hr parameter set to true in the config?

@iammehdii
Copy link
Author

I double-checked the settings and adjusted them to both true and false; however, I encountered an issue. I downloaded the data from the provided Google Drive file.

There are three datasets: ubnormal, avenue, and hr-shanghitech. In your code, when we pass "avenue," it indicates that it is "not usable yet," which means we need to download hr_avenue. Where can we find this?

Additionally, I downloaded the pretrained checkpoints, but the code did not execute successfully with any of the provided configuration files, regardless of whether hr is set to true or false. Could you please verify this?

I kindly ask you to clone your project with the uploaded dataset and checkpoint to ensure everything is functioning correctly. I suspect there may be an issue with the provided data or the checkpoints. I have spent a considerable amount of time on this, but it still does not work.

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

2 participants