Hi I have trained object detection model using tensorflow 1.14 object detection API, my model is performing well. However, I want to reduce/optimize parameters of model to make it lighter. How can I use pruning on trained model?
Asked
Active
Viewed 359 times
0
-
Do you have a good reason to use TF1 and Faster-RCNN in 2021? Newer frameworks and detectors may give you more power and flexibility. – SomethingSomething Nov 08 '21 at 09:06
-
I have tried new models such as Yolo, SSD, but didn't get desired results on my problem. However, Faster RCNN gives better detection performance due to two stage network. I have also use TF2. The problem with Faster RCNN model is inference speed. – Sohail Nov 08 '21 at 12:07
-
Right, but Faster-RCNN has gone through several improvements. There are obvious ones, such as replacing the VGG16 backbone by something newer and stronger, such as ResNeXt-101 and less obvious ones, such as adding FPN layers. I'm pretty sure that RetinaNet is as accurate as Faster-RCNN, yet faster, and same for YOLOv4, maybe even YOLOv3. All are one-stage detectors. – SomethingSomething Nov 08 '21 at 12:54
-
@SomethingSomething thanks for your suggestion. Can you please further suggest me on my problem. I am actually trying to detect cracks on road surface but the problem is background and and crack color is almost similar. In this case which model will works better? I am new in this area. – Sohail Nov 08 '21 at 15:04
-
Intuitively, none of the models is preferred for this task more than the others. The question is how your problem looks like. Are the cracks on the roads surrounded by bounding boxes in your training dataset? Do those bounding boxes look "typical", i.e., not extremely long, etc. The similar colors is not supposedly an issue, as long as there are pattern differences. Can you spot the cracks by your eyes? If you can then the detector may too – SomethingSomething Nov 08 '21 at 15:32
-
@SomethingSomething the cracks/defects are different in shapes and labelled with bounding box, but the size of bounding box varies, ranging from very large, medium and small. Some bounding boxes are extremely long. – Sohail Nov 08 '21 at 15:55
-
@SomethingSomething Also defects are visible, but some defects are very challenging – Sohail Nov 08 '21 at 15:57
-
Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/238994/discussion-between-sohail-and-somethingsomething). – Sohail Nov 08 '21 at 16:10
1 Answers
0
Did you check the Pruning guide on the Tensorflow website ? It has concrete examples on how to prune a model and benchmark the size and performance improvements.