xavysp / DexiNed

DexiNed: Dense EXtreme Inception Network for Edge Detection
MIT License
737 stars 156 forks source link

how to deploy to mobile for realtime scanning #27

Open weinixuehao opened 4 years ago

weinixuehao commented 4 years ago

I have used the Hed to do real-time scanning on the mobile. my input image size is 256256 but yours is 512 512 so i worry the inference speed with your network. I really want to try your network for that it`s contour is so thinner than hed.

xavysp commented 4 years ago

is so thinner than hed.

Hi, the 512x512 is the lenna image real size (also CID dataset). In the test stage, we try to test with the real image size. If your image (the real size) is 256x256, you can set DexiNed and the results will be good. But even in 256x256 HED will be faster than DexiNed because of the number of parameters. By the way, I will love to see how DexiNed works on mobile. At the end of this week, we will update DexiNed for TF2.

weinixuehao commented 4 years ago

@xavysp Hed faster than DexiNed due to the number of parameters? 1、Hed used the vgg style cnn as basic architecture network but i replaced it with the MobileNetv2 that is thinner than vgg. 2、I have deployed the Hed on mobile with tflite-gpu. 3、I am trying to use Mediapipe for better performance as it directly read camera frame from gpu and some preprocessing opertaion on gpu(e.g int to float、normalization and do not need copy between cpu and gpu ) and so on. 4、Do you have plan to deploy on mobile?real-time scanning can accept some loss of accuracy.

xavysp commented 4 years ago

@xavysp Hed faster than DexiNed due to the number of parameters?

Well, in terms of PC, in the test stage hed is faster

1、Hed used the vgg style cnn as basic architecture network but i replaced it with the MobileNetv2 that is thinner than vgg.

wow here you are the pro, cool you do that with DexiNed.

2、I have deployed the Hed on mobile with tflite-gpu.

I never ever have used tflite-gpu, but I love to in the future, just right now I have other projects on mine and you know I do not have time :(

3、I am trying to use Mediapipe for better performance as it directly read camera frame from gpu and some preprocessing opertaion on gpu(e.g int to float、normalization and do not need copy between cpu and gpu ) and so on. 4、Do you have plan to deploy on mobile?real-time scanning can accept some loss of accuracy.

Right now I do not have time :( sorry but if you do that, I will be here for any support

Xavier

g-h-anna commented 1 year ago

Hi, @weinixuehao, did you actually manage to use DexiNed on mobile?