1

I am trying to find a worked example of neural network pruning for the Faster-RCNN architecture.

My core stack is Tensorflow 1.12, its object_detection API (link) on Python3.5.2 in Ubuntu 16.04 LTS. I came across some Neural Network Pruning repos (e.g. link, implementing NVIDIA's pruning paper with Taylor expansion link - looking the most promising however (a) implemented in Pytorch and (b) on classification networks rather than detectors).

I am also aware of the existence of a pruning functionality within TensorFlow under this package (link), but could only run an example found in the comments of the following StackOverflow question (link) to train and prune (not thoroughly tested) a simple Neural Network for hand written digits classification using MNIST dataset.

I am looking for a worked example and not reporting any bugs or issues in code.

Can someone point to me a worked example of pruning Faster-RCNN -or other detectors- found on the TensorFlow's object detection API (link), preferably using TensorFlow's pruning package (link)?

Antonis
  • 11
  • 2

1 Answers1

0

Pruning is orthogonal to the meta-architecture used for object detection. When we talk about the TensorFlow Object Detection API, it heavily relies on builders that read the config and create corresponding nets, classes etc. I believe you want to prune the feature extractor as the most heavy part. If so, you need to first prune some feature extractor from slim (let's say, Inception-V2), give it a name, add its pruned version to models, adjust proto config and many more. Shortly speaking, you need to introduce a new type of feature extractor. But I am not aware of any existing examples on that.

Dmytro Prylipko
  • 4,762
  • 2
  • 25
  • 44
  • Thank you so much for sharing your thoughts and pointing practical starting points. Inception-V2 looks like the best trade-off (thumps up for the suggestion!) of accuracy and speed for the Faster-RCNN of the model zoo [link](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md) from my experiments as well . The path of (1) using a pre-trained extractor/classifier compatible with the object detection api, (2) then pruning it and (3) finally perform some "operation" to glue it on a Faster-RCNN network was my initial thought. (continuing...) – Antonis Feb 08 '19 at 16:17
  • (...continuing) Going into more detail, this would be a first step but based on this paper [link](https://www.researchgate.net/publication/325938560_An_Efficient_Object_Detection_Algorithm_Based_on_Compressed_Networks), the computationally "heavy" part of the network is the (4) feature fusing of the (5) the region proposal network with (1) the feature detector/classifier and not just (1). – Antonis Feb 08 '19 at 16:21
  • (...continuing) So ideally we should aim for pruning both (1) and (4) of the network. I will try to do something practical at least for (1) and share a suggested solution. In the mean time it would be great if the community provided a worked example. – Antonis Feb 08 '19 at 16:21
  • I am afraid writing such an example would require too much effort. – Dmytro Prylipko Feb 08 '19 at 16:29