Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Help in converting pkl to pb file (FPN not supported) #134

Open
vvrmahendra opened this issue Feb 9, 2018 · 11 comments
Open

Help in converting pkl to pb file (FPN not supported) #134

vvrmahendra opened this issue Feb 9, 2018 · 11 comments

Comments

@vvrmahendra
Copy link

vvrmahendra commented Feb 9, 2018

I tried to convert mask r-cnn pkl file to caffe2 pb file with the convert_pkl_to_pb.py script. I am confused what to pass in for --cfg option. There are several yaml files that are in config directory, but it looks like these are for train, test etc. The documentation in the convert_pkl_to_pb.py says to copy / create a new yaml based of lib/core/config.py but I am not sure what options would go in this yaml file. Is there a sample yaml config file available?

@groupbox-dev
Copy link

@obendidi
Copy link

in here it says that FPN is not supported , so actually most models can't be converted , or is there a hack I don't know of ?

@blateyang
Copy link

I think assert not cfg.FPN.FPN_ON, "FPN not supported." means if cfg.FPN.PFN_ON is set to False, then it will print "FPN not supported". Actually FPN is supported except that the flag is set to False. @Bendidi

@obendidi
Copy link

obendidi commented Mar 8, 2018

Actually assert not cfg.FPN.FPN_ON, "FPN not supported." means exactly the opposite of what you said :)

my first try was with FPN_on set on True

'FPN': {'COARSEST_STRIDE': 32,
         'DIM': 256,
         'EXTRA_CONV_LEVELS': False,
         'FPN_ON': True,
         'MULTILEVEL_ROIS': True,
         'MULTILEVEL_RPN': True,
         'ROI_CANONICAL_LEVEL': 4,
         'ROI_CANONICAL_SCALE': 224,
         'ROI_MAX_LEVEL': 5,
         'ROI_MIN_LEVEL': 2,
         'RPN_ANCHOR_START_SIZE': 32,
         'RPN_ASPECT_RATIOS': (0.5, 1, 2),
         'RPN_MAX_LEVEL': 6,
         'RPN_MIN_LEVEL': 2,
         'ZERO_INIT_LATERAL': False},

and I still get the assertion error :

Traceback (most recent call last):
  File "tools/convert_pkl_to_pb.py", line 571, in <module>
    main()
  File "tools/convert_pkl_to_pb.py", line 525, in main
    assert not cfg.FPN.FPN_ON, "FPN not supported."
AssertionError: FPN not supported.

@rbgirshick rbgirshick changed the title Help in converting pkl to pb file Help in converting pkl to pb file (FPN not supported) Mar 8, 2018
@blateyang
Copy link

Sorry, I misunderstood the code. You are right.@Bendidi Hope someone else can explain it.

@orionr
Copy link

orionr commented Mar 9, 2018

We are working on FPN support (the CollectAndDistributeFpnRpnProposals operator) with standard Caffe2 C++, so stay tuned.

@ChengshuLi
Copy link

@orionr

Do you have a rough estimation of the timeline about this FPN support with standard Caffe2 c++? Thanks a ton!

@Luyang1125
Copy link

I'm also interested in transfer the pkl file to pb. Want to know what is the current status on this. Thanks!

@gadcam
Copy link
Contributor

gadcam commented May 15, 2018

If #372 is merged it should close this issue.

@Gautam1121
Copy link

I am facing issue in getting mask, lost mask in the conversion.
I have used " Detectron/tools/convert_pkl_to_pb.py " file to convert my model.

How can i get mask as well?

Help appreciated, thanks :)

@ashuGulati
Copy link

how to convert a .pb to .pkl format?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

11 participants