Pawel
Pawel

Reputation: 83

Use Object detection model as feature extractor

I have mask-rcnn model that was trained using Object Detection API to detect some objects. Now I have other task that needs to do regression on those images (and also other features). Is is possible to use the trained mask-rcnn model as feature extractor (similarly to how transfer learning works) and change the last layer (or layers) to other task?

Upvotes: 0

Views: 306

Answers (1)

xcodesucks123
xcodesucks123

Reputation: 434

Mask r-cnn creates a shared feature map which is used for predictions on the RPN regions. With some slight tweaking to the object detection API, you could pull out the tensor containing the features for a given region. Normally these features are used for the box/mask prediction but you could use it for whatever else.

If you only need it to be a feature extractor (it remains frozen) this should work. If you want to actually continue to train mask r-cnn based on further downstream results, this gets harder to do with the object detection API because you have to connect everything and modify a bunch of the TF training code. In this case you might consider building your own model, or a different approach depending on the problem.

Upvotes: 1

Related Questions