tantara / JejuNet

Real-Time Video Segmentation on Mobile Devices with DeepLab V3+, MobileNet V2. Worked on the project in šŸ Jeju island
http://jeju.dlcamp.org/2018/
MIT License
279 stars 54 forks source link

Support for Deeplab V3 Mobilenet V2 #1

Closed SanthoshRajendiran closed 5 years ago

SanthoshRajendiran commented 5 years ago

Hello. The application you have provided works perfectly awesome with the provided tflite file. We tried the same approach replacing the model, with newer version of deeplab from Tensorflow model zoo(https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md). The inference obtained is, there is difference in the input nodes and output nodes, between their pb and your tflite. Any suggestions or ideas on how to overcome this. Due to the difference, we are getting an issue in the loadmodel function.. Actual error is "ByteBuffer is not a valid flatbuffer model". If you need, we can provide you a Log file for the same. And also do we have to make any changes in the asset variables, if we use the recent tflite?

tantara commented 5 years ago

@SanthoshRajendiran the current version of tf/tf-lite doesn't support a part of operations used in DeepLab V3+, especially, preprocessing. I changed unsupported operations and implemented it in java or native tf-lite so that the .tflite is slightly different with the original .pb. The project was based on tf 1.8.

kismeter commented 5 years ago

@tantara would you give some directions on how you change the .tflite, I noticed that your .tflite only has 71 operators, the inputs node is MobilenetV2/MobilenetV2/input, not the official ones ImageTensor. Thanks

hufangjian commented 5 years ago

hiļ¼Œcould you give me some advise on how to product the MobileNet.tflite,thanks.

hufangjian commented 5 years ago

hiļ¼Œcould you give me some advise on how to add ā€˜RESIZE_BILINEARā€˜ ops in tensorflow lite? the official have not support 'tf.image.resize_bilinear' ops . thanks.

tantara commented 5 years ago

@SanthoshRajendiran @kismeter @hufangjian I will post tutorials about how to convert/run deeplabv3+ on tf-lite. Please refer to the posts.

tantara commented 5 years ago

@kismeter I skipped some layers on preprocessing due to unsupported ops.

tantara commented 5 years ago

@hufangjian I didn't use tf.image.resize_bilienar on tf-lite, and implemented it in native java.

kismeter commented 5 years ago

@tantara do you have any progress on post tutorials about how to convert/run deeplabv3+ on tf-lite?

tantara commented 5 years ago

@kismeter I'm planning to post a series of tutorials in tf 2.0.

kismeter commented 5 years ago

@tantara thanks, waiting for your tutorials.

normandra commented 5 years ago

bump, also waiting for said tutorials

tantara commented 5 years ago

Hi guys, please refer to the official tutorials https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/quantize.md