tub-rip / event_based_optical_flow

The official implementation of "Secrets of Event-based Optical Flow" (ECCV2022 Oral and IEEE T-PAMI 2024)
GNU General Public License v3.0
144 stars 13 forks source link

Pre-trained Model #16

Closed Alkaponn closed 3 months ago

Alkaponn commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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

shiba24 commented 3 months ago

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 .