tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

[Optimization target] The inference time of DeepLabV3's cityscapes architecture is long

Open Linchenn opened this issue 2 years ago • 4 comments

DeepLabV3 with cityscapes takes long time to execute and we need to figure out the reason and then add it.

Linchenn avatar Aug 08 '22 19:08 Linchenn

Benchmarked https://tfjs-benchmarks.web.app/local-benchmark/index.html?benchmark=custom&modelUrl=https://storage.googleapis.com/tfhub-tfjs-modules/tensorflow/tfjs-model/deeplab/cityscapes/1/quantized/2/1/model.json&ImageTensorShape=1,227,500,3:

Run on Mac pro 2019 with WebGL backend, the computer crashed. Run on gLinux 16CPU with CPU backend, it takes ~14min: image Run on Windows with high performance video card on webgl backend, it takes 543ms: image

Linchenn avatar Aug 15 '22 18:08 Linchenn

@qjia7 @gyagp

As discussed with @lina128 , since the cityscape 'architecture' for DeepLabV3 model takes too much time to run inference and it is behind the times, we are considering not to add this architecture to DeepLabV3 for benchmark tools. Please let me know if you have any suggestions.

(Will also delete the row for it in the spreadsheet.)

Linchenn avatar Aug 16 '22 22:08 Linchenn

@Linchenn Just tried webgpu (with #6760 ) on Intel TGL, about 700ms. Agree to not add it to DeepLabV3 in benchmarks for now. But there maybe some optimization opportunities. Can we keep this issue or file a new issue to optimize this model?

qjia7 avatar Aug 17 '22 03:08 qjia7

@Linchenn Just tried webgpu (with #6760 ) on Intel TGL, about 700ms. Agree to not add it to DeepLabV3 in benchmarks for now. But there maybe some optimization opportunities. Can we keep this issue or file a new issue to optimize this model?

Sure, we could keep it and I just updated the name of this ISSUE.

Linchenn avatar Aug 18 '22 00:08 Linchenn