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

Pre-trained Model #16

Closed
Alkaponn opened this issue Jun 25, 2023 · 6 comments
Closed

Pre-trained Model #16

Alkaponn opened this issue Jun 25, 2023 · 6 comments

Comments

@Alkaponn
Copy link

Hi, thanks for such great work!

I tried to load the model file specified in this comment using pickle, but I got this error:

_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

Code:

import pickle

f = open("model_flow32/archive/data.pkl", "rb")
model = pickle.load(f)

If that file is no longer available, could you share it again?
Also, it would be great if you could explain how to load a pre-trained model in "run_inference.py".

@shiba24
Copy link
Collaborator

shiba24 commented Jun 26, 2023

Hi @Alkaponn , thanks for your interest.
I think you need to use torch.load(path) for this, not pickle. Also don't unarchive this by yourself (don't use data.pkl) but use it just as a single file (model_flow32) for the argument.

@Alkaponn
Copy link
Author

Thanks for the help! After loading the model, how can I use it in the published code? Should I implement the evaluation from scratch?

@shiba24
Copy link
Collaborator

shiba24 commented Jul 5, 2023

@Alkaponn I could release some additional codes of mine, but it will take some time.
If you want to implement it, I can help, so post/send me any questions.

@Alkaponn
Copy link
Author

Alkaponn commented Jul 5, 2023

@Alkaponn I could release some additional codes of mine, but it will take some time. If you want to implement it, I can help, so post/send me any questions.

Thanks a lot. I'm planning to evaluate the model on a subset of the DSEC dataset. I've managed to download the pre-trained model but I think I need the DNN model class implementation.

@Alkaponn
Copy link
Author

Hi, could you upload the codes if you are available?

@shiba24
Copy link
Collaborator

shiba24 commented Aug 21, 2024

Hi @Alkaponn , sorry for being late but I released the EV-FlowNet model file.
https://github.com/tub-rip/event_based_optical_flow/blob/main/src/solver/nnmodels/ev_flownet.py
Please check it.

Training/inference scripts may still take some time, and I will keep track on #14 .

@shiba24 shiba24 closed this as completed Aug 21, 2024
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