ChunML / ssd-tf2

A super clean implementation of SSD (Single Shot MultiBox Detector) made possible by Tensorflow 2.0
MIT License
115 stars 54 forks source link

Can you make ssd with mobilenet backbone? #10

Open khiemauto opened 4 years ago

khiemauto commented 4 years ago

Dear ChunML, I tested your code ssd-tf2. I look good job. But, i need deploy on Coral TPU with small memory. So, i want decrease size model. Can you add option SSD with MOBILENET backbone? Thank you!

sterlingrpi commented 4 years ago

Have you converted the model to int8 tflite and used the tpu compiler? This will reduce the size. I am running on TPU and raspberry pi. So I will be implementing tflite and possibly mobilenet.

javimg140 commented 4 years ago

Hi, I am trying to convert the trained model to tensorflow lite to use it in a Google TPU Coral board but when I try to save the model (first step to convert it to TF lite) it fails saying lists into tensors

sterlingrpi commented 4 years ago

@javimg140 the trouble I am seeing with converting this to TPU is the model is defined as a subclass, which is not supported by tflite. I am working on defining it as a functional model. Still working on that. Don't know if it'll work yet.

javimg140 commented 4 years ago

@sterlingrpi thanks, I am also checking if it is possible to save it meanwhile (according to tensorflow you can save subclassed models) and if not I will also try to create a functional model based on this.

sterlingrpi commented 4 years ago

@javimg140 I got the model defined using functional API and it converts to tflite int8 and TPU. Now my problem is training on my own data doesn't yield good results. I'm going to try with the VOC dataset

javimg140 commented 4 years ago

@javimg140 I got the model defined using functional API and it converts to tflite int8 and TPU. Now my problem is training on my own data doesn't yield good results. I'm going to try with the VOC dataset

@sterlingrpi that is awesome, could you let me check how you did it? Do you have the code in your github?

sterlingrpi commented 4 years ago

@javimg140 https://github.com/sterlingrpi/ssd_tflite_tpu

javimg140 commented 4 years ago

@sterlingrpi about the problem with the training that you said, did you modify the number of classes to study? Because in your code you wrote 21 but i saw you only wrote 6 kinds of birds. I am trying with my own dataset and it works fine (I have only done a simple test so I cant be sure yet)

sarattha commented 4 years ago

@sterlingrpi about the problem with the training that you said, did you modify the number of classes to study? Because in your code you wrote 21 but i saw you only wrote 6 kinds of birds. I am trying with my own dataset and it works fine (I have only done a simple test so I cant be sure yet)

I agree, if change number of class to 21. It works fine.

sterlingrpi commented 4 years ago

@javimg140 and @sarattha are you saying that after correcting the number of classes the functional api model trained and works successfully (i.e. detects objects reliable)?

And you used my code? https://github.com/sterlingrpi/ssd_tflite_tpu

What dataset were you using?