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

Support export of CollectAndDistributeFpnRpnProposalsOp #334

Closed
wants to merge 3 commits into from

Conversation

orionr
Copy link

@orionr orionr commented Apr 2, 2018

  • This is somewhat of an RFP, but hopefully we'll land some variation in the near future.

)
net.external_input.extend([ext_input])
return [gen_proposals_op]
@op_filter()
Copy link
Contributor

Choose a reason for hiding this comment

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

@op_filter(type='Python')?

Copy link
Contributor

Choose a reason for hiding this comment

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

@newstzpz L218 is here to replace it if I am not mistaking

Copy link
Author

Choose a reason for hiding this comment

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

I don't really have much preference between a direct check below and a type='Python' check in the decorator. Any preference across the team?

@orionr orionr force-pushed the add-export-support-fpn branch from 8c49e43 to 874b2a6 Compare April 4, 2018 21:56
@orionr
Copy link
Author

orionr commented Apr 4, 2018

Okay - this should be able to land when ready. I rebased to latest and ran

wget https://s3-us-west-2.amazonaws.com/detectron/35857197/12_2017_baselines/e2e_faster_rcnn_R-50-C4_1x.yaml.01_33_49.iAX0mXvW/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl -O models/e2e_faster_rcnn_R-50-C4_1x_35857197.pkl

python tools/convert_pkl_to_pb.py --use_nnpack 0 --net_name detectron_e2e_faster_rcnn_R-50-C4_1x_35857197 --cfg configs/12_2017_baselines/e2e_faster_rcnn_R-50-C4_1x.yaml --out_dir models/pb_output/e2e_faster_rcnn_R-50-C4_1x/ --test_img demo/16004479832_a748d55f21_k.jpg TEST.WEIGHTS models/e2e_faster_rcnn_R-50-C4_1x_35857197.pkl

to confirm existing models work.

The FPN model as follows fails on test, but likely due to GenerateProposals needing some adjustment. For the record, I ran

wget https://s3-us-west-2.amazonaws.com/detectron/35857345/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_1x.yaml.01_36_30.cUF7QR7I/output/train/coco_2014_train%3Acoco_2014_valminusminival/generalized_rcnn/model_final.pkl -O models/e2e_faster_rcnn_R-50-FPN_1x_35857345.pkl

python tools/convert_pkl_to_pb.py --use_nnpack 0 --net_name detectron_e2e_faster_rcnn_R-50-FPN_1x_35857345 --cfg configs/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_1x.yaml --out_dir models/pb_output/e2e_faster_rcnn_R-50-FPN_1x/ --test_img demo/16004479832_a748d55f21_k.jpg TEST.WEIGHTS models/e2e_faster_rcnn_R-50-FPN_1x_35857345.pkl

cc @yinghai who will be working on FPN support.

@stanleychima
Copy link

stanleychima commented Apr 5, 2018 via email

@daquexian daquexian mentioned this pull request Apr 17, 2018
3 tasks
@facebook-github-bot
Copy link

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email [email protected] with your details so we can update your status.

facebook-github-bot pushed a commit that referenced this pull request Aug 8, 2018
Summary:
Based on orionr's work

 - [x] Solve [the problem about GenerateProposals](#334 (comment))
 - [x] Use the existing [ResizeNearest](https://github.com/caffe2/caffe2/blob/master/caffe2/operators/resize_op.cc#L57) layer instead of UpsampleNearest. ResizeNearest has cpu implementation and neon optimization
 - [x] Make it work (with pytorch/pytorch#7091)

With this PR, FPN is supported in cooperation with pytorch/pytorch#7091. I have verified that it works on `e2e_faster_rcnn_R-50-FPN_1x.yaml`
Pull Request resolved: #372

Reviewed By: newstzpz

Differential Revision: D9213242

Pulled By: rbgirshick

fbshipit-source-id: 8fc7b77e6cbf08adaafd760505dd760df59bfd79
@gadcam
Copy link
Contributor

gadcam commented Aug 16, 2018

@rbgirshick As #372 is in I think this one could be closed.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@rbgirshick rbgirshick closed this Aug 17, 2018
xzhewei pushed a commit to xzhewei/Detectron that referenced this pull request Jan 10, 2019
Summary:
Based on orionr's work

 - [x] Solve [the problem about GenerateProposals](facebookresearch#334 (comment))
 - [x] Use the existing [ResizeNearest](https://github.com/caffe2/caffe2/blob/master/caffe2/operators/resize_op.cc#L57) layer instead of UpsampleNearest. ResizeNearest has cpu implementation and neon optimization
 - [x] Make it work (with pytorch/pytorch#7091)

With this PR, FPN is supported in cooperation with pytorch/pytorch#7091. I have verified that it works on `e2e_faster_rcnn_R-50-FPN_1x.yaml`
Pull Request resolved: facebookresearch#372

Reviewed By: newstzpz

Differential Revision: D9213242

Pulled By: rbgirshick

fbshipit-source-id: 8fc7b77e6cbf08adaafd760505dd760df59bfd79
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants