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

PR on bin file iterator and first event visualization example #253

Merged
merged 9 commits into from
Sep 24, 2023

Conversation

agirbau
Copy link
Contributor

@agirbau agirbau commented Sep 20, 2023

This PR contains:

  1. bin file iterator class (bin file is used in N-Caltech101 and N-MNIST)
  2. Visualization example using "Faces_easy/0001.bin" of N-Caltech101

Copy link
Owner

@shiba24 shiba24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment - can you check it?

t_current += t_window
i += 1

# TODO: When using a for loop the event iterator stays in an infinite loop
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because IteratorBin class does not have StopIteration.
Iterator needs to tell the condition for the termination. Something like: https://github.com/shiba24/event-vision-library/blob/main/src/evlib/codec/fileformat/text.py#L37

Can you have a way to tell if there is any more event to read?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I read all the .bin file in one time (which may not be the best practice for huge files), so the iterator just "iterates" a single time.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. My design intention is IteratorAccess is for any filesize (can be large), so the loader should not assume it to be reasonably small. For smaller size, I found it more useful to use BlockAccess like hdf5 loader (assume to load all contents at once). At least this should work for timestamps.
But let's proceed as it is. Thanks for the PR.

@shiba24 shiba24 merged commit 8f6d326 into shiba24:main Sep 24, 2023
14 checks passed
@shiba24 shiba24 added the enhancement New feature or request label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants