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

OverflowError: Python integer 317963872 out of bounds for uint8 #43

Open
Xinyu-lab opened this issue Dec 17, 2024 · 4 comments
Open

OverflowError: Python integer 317963872 out of bounds for uint8 #43

Xinyu-lab opened this issue Dec 17, 2024 · 4 comments
Assignees

Comments

@Xinyu-lab
Copy link

Xinyu-lab commented Dec 17, 2024

Hello. When I run the visualization commands and instructions using Python, the following error messages will pop up. It seems that this error is caused by the size exceeding the boundary.Could you please tell me how to solve this?

image

After that, I found through debugging that it was because self._ev_size was of the uint8 type. When I changed it to the int type, the program could run normally. I'm wondering if this modification is correct?

Best Regards!

@lbristiel-psee lbristiel-psee self-assigned this Dec 18, 2024
@lbristiel-psee
Copy link
Collaborator

Hello,

I am unable to reproduce your failure with the various DAT files I used.
Could you specify or share the file you used to reproduce the problem?

About the change, self._ev_size should contain the number of byte of an event. Typically this value should be 8 (see our doc page about DAT format: https://docs.prophesee.ai/stable/data/file_formats/dat.html#binary-event-type-and-size) so uint8 should be enough. Maybe the failure you are hitting is due to a corrupted file.

Best,
Laurent from Prophesee Support

@Xinyu-lab
Copy link
Author

Xinyu-lab commented Dec 19, 2024

Thank you for your reply. I have successfully solved the original problem, but I've encountered a new one.
When I was visualizing the data, errors and warnings like those shown in the following two screenshots popped up.
image
image
It seems that there is data overflow again. The data I used is "moorea_2019-02-18_000_td_61500000_121500000_td.dat" in 1Mpx/train. The Python environment is 3.9.21. Some variable information when the errors occurred is shown in the following picture.
image
Then I tested multiple 1Mpx data and found that the same error was reported for all of them. Moreover, the variable values were very close when the error occurred. However, when I visualized the Gen1 dataset, no problem emerged.
I'm looking forward to your reply.
Best Regards

@lbristiel-psee
Copy link
Collaborator

Hello,

Thank you for sharing your screenshots.

Regarding the first error, I couldn’t identify the command you used, so it’s difficult to determine the exact cause. It seems that an invalid argument might have been passed.

For the second issue, I tested some DAT files from the 1Mpx dataset again today but couldn’t reproduce the error you mentioned. I tried multiple DAT files, though not specifically the one you referenced.

If you’ve identified a fix in the code that resolves the issue, please feel free to share it with us. We’d be happy to review it and consider integrating it into our solution.

In the meantime, could you provide more details about what you’re trying to achieve? With a better understanding, we might be able to suggest alternative approaches or tools to address your needs.

Best,
Laurent for Prophesee Support

@Xinyu-lab
Copy link
Author

Hello. I'm currently conducting some research related to object detection with event cameras. Thank you very much for your reply.
Regarding the problem I encountered above, I solved it by forcibly converting the data type to int64 according to the hints given by the warning. Strangely enough, the int type in Python should automatically change its length according to the data, but this method did indeed solve the problem.
However, I've encountered new problems with certain data. For example, in the file "train/moorea_2019-06-26_test_02_000_976500000_1036500000_td.dat", there are problems as shown in the screenshot below. It seems that the range of the label has exceeded the maximum value of the resolution.
image

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