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

float division by zero #4

Open
FreedomPuppy77 opened this issue Aug 27, 2024 · 5 comments
Open

float division by zero #4

FreedomPuppy77 opened this issue Aug 27, 2024 · 5 comments

Comments

@FreedomPuppy77
Copy link

/data/lyh/Affwild2/cropped_aligned/1-30-1280x720
Traceback (most recent call last):
File "/home/sherry/lyh/RJCMA/abaw6_preprocessing/project/abaw5/main.py", line 18, in
pre.generate_per_trial_info_dict()
File "/home/sherry/lyh/RJCMA/abaw6_preprocessing/project/abaw5/preprocessing.py", line 111, in generate_per_trial_info_dict
this_trial['video_annotated_index'] = self.get_annotated_index(annotated_index, **get_annotated_index_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sherry/lyh/RJCMA/abaw6_preprocessing/project/abaw5/preprocessing.py", line 225, in get_annotated_index
sampled_index = np.asarray(np.round(target_frequency / source_frequency * annotated_index), dtype=np.int64)
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero
Hello, I can not solve this problem, I do not know what is the reason? Can you help me to solve it?

@praveena2j
Copy link
Owner

I guess you need to debug the code, check the data in the variables before this line

@FreedomPuppy77
Copy link
Author

Ok, thanks for your answer, I'll take a closer look at the code, and by the way, when doing the preprocessing, is it the source dataset or the official cropped dataset that is used.

@praveena2j
Copy link
Owner

I have used the official cropped and aligned images provided by the organizers

@FreedomPuppy77
Copy link
Author

Okay, thanks again.

@muginekoo
Copy link

Maybe you should check the folder name of raw radios.

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

3 participants