Ask Your Question

How to use Halide in TextDetectorCNN

asked 2018-11-14 20:37:52 -0500

updated 2018-11-15 02:00:35 -0500

berak gravatar image

Hi, I want to use TextDetectorCNN. However, its speed is about 250ms which is slow. So I rebuild opencv_contrib with Halid backend. I wonder how to use Halide in TextDetectorCNN?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-11-15 01:32:10 -0500

berak gravatar image

updated 2018-11-15 02:01:35 -0500

you can add a line like:

 net.setPreferableBackend(1); // DNN_BACKEND_HALIDE

have a look here and here

edit flag offensive delete link more


and just saying... 250ms. is NOT slow. it's a mammoth network !

berak gravatar imageberak ( 2018-11-15 01:33:13 -0500 )edit

thank you. Yes, it's fast. However, it doesn't take full use of GPU. Besides, When I use net_.setPreferableBackend(DNN_BACKEND_HALIDE); It throws an exception in "Halide.h" Internal::make_entity_name(this, "Halide:.*:Buffer<.*>", 'b');

shijieSun gravatar imageshijieSun ( 2018-11-15 01:58:22 -0500 )edit

let's see, what @dkurt says ;)

berak gravatar imageberak ( 2018-11-15 02:01:52 -0500 )edit

@berak, Thanks!

@shijieSun, What is TextDetectorCNN? Which CPU/GPU do you have?

dkurt gravatar imagedkurt ( 2018-11-15 07:43:57 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-11-14 20:37:52 -0500

Seen: 58 times

Last updated: Nov 15 '18