caffemodel2pytorch
                                
                                
                                
                                    caffemodel2pytorch copied to clipboard
                            
                            
                            
                        Add support for older caffe model
The original C3D model (used by the fantastic anomaly detection work of Waqas https://github.com/WaqasSultani/AnomalyDetectionCVPR2018) can be downloaded from here http://vlg.cs.dartmouth.edu/c3d/ (direct link: https://www.dropbox.com/s/vr8ckp0pxgbldhs/conv3d_deepnetA_sport1m_iter_1900000?dl=0 )
This caffe model, when python3 caffemodel2pytorch.py conv3d_deepnetA_sport1m_iter_1900000 -o conv3d_deepnetA_sport1m_iter_1900000.h5 errors out because net_param.layers contains blobs, but these blobs do not contain a data field, but many diff fields (one per weight)
I don't know why this is the case. I assume it is due to an older caffe version used
Please kindly add support for these kind of models as well
Sorry, I don't develop this library anymore :( I can answer questions about the codebase, but I'm not working on it anymore.
You'd have to modify it yourself (e.g. somehow ignore those blobs? or provide dummy values for data field if it makes sense). If you do, please be welcome to submit a PR.
Here is the repo with that modified Caffe: https://github.com/facebookarchive/C3D/tree/master/C3D-v1.1. The first step would be to find the corresponding caffe.proto and model's proto
Here're caffe.proto. Not sure which one was used for the checkpoint they provide:
- https://github.com/facebookarchive/C3D/blob/master/C3D-v1.1/src/caffe/proto/caffe.proto
 - https://github.com/facebookarchive/C3D/blob/master/C3D-v1.0/src/caffe/proto/caffe.proto