Ask Your Question

Robb's profile - activity

2019-12-03 05:50:21 -0600 received badge  Famous Question (source)
2019-01-17 03:19:12 -0600 received badge  Notable Question (source)
2018-09-07 17:03:43 -0600 received badge  Popular Question (source)
2018-04-06 06:56:39 -0600 edited answer readNetFromTensorflow fails on retrained NN

edit: Fixed it it was my error (but the lines below could have some use for others) it was the wrong blob: blob= cv2.dnn

2018-04-06 06:36:42 -0600 edited answer readNetFromTensorflow fails on retrained NN

I threw zideks graph into tensorflow and Opencv with the following scripts (some test functions i copy pasted and change

2018-04-06 05:25:48 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt looked into his graph and wrote a script in python that takes a picture and gives the output of the detection for

2018-04-06 05:16:57 -0600 edited answer readNetFromTensorflow fails on retrained NN

I threw zideks graph into tensorflow and Opencv with the following scripts (some test functions i copy pasted and change

2018-04-06 05:01:22 -0600 answered a question readNetFromTensorflow fails on retrained NN

I threw zideks graph into tensorflow and Opencv with the following scripts (some test functions i copy pasted and change

2018-04-06 04:21:02 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt looked into his graph and wrote a script in python that takes a picture and gives the output of the detection for

2018-04-05 04:38:34 -0600 commented answer readNetFromTensorflow fails on retrained NN

seems tensorflow 1.7 broke retrained nets completely can't even load one trained in 1.7 with tensorflow . Which version

2018-04-05 03:47:19 -0600 commented answer readNetFromTensorflow fails on retrained NN

I had the same problems haven't read about someone getting accurate results (compareable to those in Python) with a retr

2018-01-03 12:22:00 -0600 edited question tensorflow retrained graph in 3.3.1

tensorflow retrained graph in 3.3.1 Hi, I still can't seem get a retrained graph working in Opencv it is either not load

2018-01-03 11:48:50 -0600 edited question tensorflow retrained graph in 3.3.1

tensorflow retrained graph in 3.3.1 Hi, I still can't seem get a retrained graph working in Opencv it is either not load

2018-01-03 11:47:25 -0600 asked a question tensorflow retrained graph in 3.3.1

tensorflow retrained graph in 3.3.1 Hi, I still can't seem get a retrained graph working in Opencv it is either not load

2017-11-10 11:19:52 -0600 commented answer SSD_mobileNet displaying N/A 99%

Opencv 3.3.0 or 3.3.1?

2017-11-10 05:33:23 -0600 commented question Fail to compile OPENCV 3.3.1 LIB windows ARM with VC15

I gave up doing it on windows, too many small problems on all ends. I would try it on ubuntu.

2017-11-08 04:07:29 -0600 edited question Make a NN work in 3.3.0 out of Tensorflow

Make a NN work in 3.3.0 out of Tensorflow Hi, I already verified that the retrained NN (Tensorflow retrain script) are w

2017-11-08 03:09:50 -0600 asked a question Make a NN work in 3.3.0 out of Tensorflow

Make a NN work in 3.3.0 out of Tensorflow Hi, I already verified that the retrained NN (Tensorflow retrain script) are w

2017-11-06 10:07:53 -0600 commented answer readNetFromTensorflow fails on retrained NN

@Adez take that back i have no idea what it is @dkurt Installed 3.3.1 on ubuntu in VM and i can load it there and it see

2017-11-06 08:45:43 -0600 commented answer readNetFromTensorflow fails on retrained NN

@Adez take that back i have no idea what it is @dkurt Installed 3.3.1 on ubuntu in VM and i can load it there and it see

2017-11-06 07:00:00 -0600 commented answer readNetFromTensorflow fails on retrained NN

@Adez my guess would be the labels.txt ? @dkurt has the net revealed anything to you?

2017-11-02 09:14:12 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt of course upload: link text . That script however sadly throws a utf8 error ? \tensorflow\python\util\compat.

2017-11-02 08:01:26 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt Could it have anything to do with me training it with cuda (extra transform or inference needed?)

2017-11-01 12:14:41 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt I meant i created a "new" retrained net with exactly your commands and it throws the error, i posted a few minute

2017-11-01 11:55:20 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt First thanks again for your time. I had to retrain another net. I just tried too much stuff the last few days and

2017-11-01 08:55:37 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt Not in tf yet, i only tried to load it there (was loaded) in OpenCv, in python, it throws on net.Forward() = err

2017-11-01 08:52:05 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt Not in tf yet, i only tried to load it there (was loaded) in OpenCv, in python, it throws \opencv-3.3.0\modules\

2017-11-01 07:48:10 -0600 commented answer readNetFromTensorflow fails on retrained NN

@dkurt I could load the retrained graph after doing everything exactly as described, but it seems to be empty? It is not

2017-11-01 05:02:43 -0600 commented answer readNetFromTensorflow fails on retrained NN

I could load the retrained graph after doing everything exactly as described, but it seems to be empty? It is not return

2017-10-22 03:03:08 -0600 received badge  Nice Question (source)
2017-10-12 07:15:31 -0600 marked best answer OpenCV_CreateSamples and Training can't read negatives.txt

OS: WIN 64 (German verison) BUILD In 32

around 3229 positives, 3000 negatives, all pos. are 24x24, all neg. are of different, larger resolutions (640x480 and bigger)

It seems it can't open the negatives.txt i created.

positives.txt looks like:

./Pos/1006.jpg 1 0 0 24 24
./Pos/1007.jpg 1 0 0 24 24

negatives.txt (=neg.txt) looks like:

./negatives/3212.jpg 
./negatives/3213.jpg 
./negatives/3214.jpg

also tried it with full path and without the "./" (no difference and it works with the positives). Converting negatives.txt to Ansi or UTF-8 without BOM hasn't helped either.

If i understood it correctly, he should place images randomly into one of the background images i have in my negatives.txt.

./opencv_createsamples -info positives.txt -bg neg.txt -num 1000 -maxidev 100 -vec training.vec -show

only shows positives

./opencv_createsamples -img ./pos/1015.jpg -bg neg.txt -num 1000 -maxidev 100 -vec test.vec -show

shows nothing and

./opencv_createsamples -vec test.vec -show

crashes with

OpenCV Error: Assertion failed (elements_read1 == 1 && elements_read2 == 1 && elements_read3 == 1 && elements_read4 == 1) in cvShowVecSamples, file E:\opencv_src\apps\createsamples\utility.cpp, line 1619

Also i tried to build a training.vec with the negatives just to see if it will show something there. Trying to have a look into it "-show" does not return anything. Creating samples with only positives works flawless but the training will crash with different errors and is way too fast.

/opencv_traincascade -data result -vec training.vec -bg neg.txt -numPos 900 -numNeg 2900 -numStages 4 -precalcValBufSize 2048 -precalcIdxBufSize 2048 -numThreads 3 -featureType LBP -w 24 -h 24 -minHitRate 0.99 -maxFalseAlarmRate 0.5

Examples

POS count : consumed   900 : 900
NEG count : acceptanceRatio    2900 : 1
Precalculation time: 1.077

+----+---------+---------+

|  N |    HR   |    FA   |

+----+---------+---------+

|   1|        1|        1|

+----+---------+---------+

|   2| 0.995556| 0.107586|

+----+---------+---------+


END>
Training until now has taken 0 days 0 hours 0 minutes 1 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   900 : 904
NEG count : acceptanceRatio    2900 : 0.121905
Precalculation time: 1.084

+----+---------+---------+

|  N |    HR   |    FA   |

+----+---------+---------+

|   1|        1|        1|

+----+---------+---------+

|   2|        1|        1|

+----+---------+---------+

|   3| 0.994444| 0.113103|

+----+---------+---------+

END>

Training until now has taken 0 days 0 hours 0 minutes 3 seconds.

POS count : consumed   900 : 910
Train dataset for temp stage can not be filled. Branch training terminated.

When reducing minHitRate to 0.9:

POS count : consumed   300 : 320
NEG count : acceptanceRatio    9 : 0.05625
Required leaf false alarm rate achieved. Branch training terminated.
2017-10-12 07:15:31 -0600 received badge  Scholar (source)
2017-10-06 11:42:17 -0600 marked best answer readNetFromTensorflow fails on retrained NN

Hi, I hope someone can help me.

My plan is to train a CNN in Tensorflow and use it in a app that uses OpenCV3.3 . For testing purposes i used the retrain script delivered with Tensorflow and expanded it (Inception V3) with the Flowers. (their Tutorial https://www.tensorflow.org/tutorials/...) I trained two models with it (one mobile the other just a normal one)

The resulting graph can be used in Tensorflow, but it fails to load in Opencv (Python, OpencCv 3.3, Win 7 64 ). The script does not create any Checkpoints so i can't freeze the graph (is it Frozen and can ich check this?) But i used the optimize_for_intereference to remove jpeg decoding.

When i try to load those graphs in OpenCV it throws the following errors:

mobile version:

"...tensorflow\tf_importer.cpp:465: error: (-2) More than one input is Const op in function cv::dnn::experimental_dnn_v1::`anonymous-namespace'::TFImporter::getConstBlob"

non mobile:

"tensorflow\tf_importer.cpp:447: error: (-2) Input layer not found: conv/batchnorm in function cv::dnn::experimental_dnn_v1::`anonymous-namespace'::TFImporter::connect"

Thanks for any help in advance ;-)