0

Trying to detect number plates by using faster RCNN on the images 4096 by 8192 pixels.

Instead of resizing for training I have cropped some parts of the image and labeled the number plate and trained, This way it's working but It cannot detect on actual images but only on small images.

Please guide me what is the best way to achieve such a job. How should I feed the training, and how the configuration has to be on faster_rcnn_inception_v2_pets.config. Or if you think faster RCNN is not good for this kind of job please suggest a better way, I need over %80 accuracy at least.

I have searched a lot on google but couldn't find anyone working on above 8k images.

I am attaching a sample image below as well. https://ibb.co/NKWWd7q


I have tried to do annotated training on 4096 by 8192 pixels images over google cloud servers, it consumed over 250gb RAM on single batch size.

Kind Regards.

Profstyle
  • 434
  • 4
  • 20
  • 1
    If I got you right your trained network can detect number plates if they are more prominent in an image, but not in a big image (with small plates) like the one added. Right? One way in which you could keep your trained network is to segment cars from the background. By automatically cropping out the car you can run your plate detection again. To detect cars you have multiple options. – Mr.Sh4nnon Apr 29 '19 at 21:02
  • 1
    But if you are using Yolo it will resize your training data during training process, image size doesn't matter anymore – gameon67 Apr 30 '19 at 01:25
  • @gameon67 Even tensorflow resize during the training process if i am right. – Profstyle Apr 30 '19 at 08:01
  • 1
    @Mr.Sh4nnon is it possible to classify cars as well then tell tensorflow find a car first than look for number plate. Is this truly possible, that would be faster and more accurate i think. – Profstyle Apr 30 '19 at 08:03
  • @Profstyle yes thats no problem. Just use a pertained network which can detect cars. This will return you a bounded box for the car. I guess you have to adjust the bounding box to fit your number-plate-network's input size. Then run your network on the extracted car. – Mr.Sh4nnon Apr 30 '19 at 08:13
  • 1
    @Mr.Sh4nnon Do you know any opensource example which can guide me for such job. – Profstyle Apr 30 '19 at 08:21
  • @Profstyle there are a few models which can detect cars. I'm not sure which one performs best. I have seen YOLO detecting cars quite robust and fast so far. Maybe this tutorial will help you: https://medium.com/@ablacklama/vehicle-detection-using-yolo-612a3b9b54a9 After that extract the car and just continue with your approach. – Mr.Sh4nnon Apr 30 '19 at 08:23
  • What if during inference you resize the input image first? (make it smaller). More option in Yolo cfg file you can set `random=0` so it won't randomly resized the training images – gameon67 Apr 30 '19 at 09:01
  • @gameon67 i have not tried yolo, But will check that as well, But i m willing to achieve with faster RCNN if possible. – Profstyle Apr 30 '19 at 10:23

1 Answers1

0

Here my answer as collections of my comments:

It seems that your number plates might be too small compared to the rest of the image.

Try to first extract the car with e.g. YOLO, extract it and then run your number-plate detection network again. Keep in mind that you maybe have to adjust the bounding box (the size of the car extracted) to fit your networks input size.

An example to detect cars with YOLO can be found here.

Mr.Sh4nnon
  • 327
  • 2
  • 20
  • you don't have to adjust bounding box size according to network input size. Just make sure the bounding box is correctly drawn surrounding the object – gameon67 Apr 30 '19 at 08:59
  • @gameon67 that's not what I meant. YOLO gives hime maybe a centroid of the car and/or its bounding box. This box can be eg. 500x600 pixel and is not always the same. His network seems to have an input size of 4096 x 8192 or whatever. Beginners might get confused when passing the extracted car with the wrong size. – Mr.Sh4nnon Apr 30 '19 at 09:02
  • @Mr.Sh4nnon extraction is not an option. My idea was find the car first without touching the image, than search for number plate, I have to detect the number plates under 1-2 seconds i've got over 500TB of image datas. – Profstyle Apr 30 '19 at 10:23
  • I dont get this one. What do you mean by not touching the image? – Mr.Sh4nnon Apr 30 '19 at 10:36
  • @Mr.Sh4nnon i mean not extracting or cropping the car first, that has to be done in one go. – Profstyle May 02 '19 at 09:13