Ask Your Question

pulp_fiction's profile - activity

2019-04-10 04:12:10 -0500 received badge  Notable Question (source)
2018-06-23 18:10:11 -0500 received badge  Popular Question (source)
2018-04-24 08:39:29 -0500 received badge  Notable Question (source)
2017-10-16 02:19:55 -0500 received badge  Popular Question (source)
2017-05-12 07:26:00 -0500 received badge  Popular Question (source)
2017-04-26 16:52:35 -0500 received badge  Popular Question (source)
2017-04-09 16:16:54 -0500 received badge  Popular Question (source)
2016-11-17 23:41:57 -0500 received badge  Famous Question (source)
2016-11-12 03:35:55 -0500 received badge  Nice Question (source)
2016-06-12 07:54:20 -0500 received badge  Notable Question (source)
2016-03-29 20:59:13 -0500 received badge  Popular Question (source)
2015-05-05 07:24:39 -0500 commented question opencv_traincascade : Acceptance Ratio- Unconsistent Behavior

@StevenPuttemans : I wanted to ask a thing : I have been training with -w 60 and -h 50 uptil now. In Naotoshi Seo's notes on the training he has trained the -w 20 and -h 20. My question is : Should I decrease the current width and height ratio furthermore? Is it gonna result in better classifier?

2015-05-05 06:01:15 -0500 commented question opencv_traincascade : Acceptance Ratio- Unconsistent Behavior

@theOneCV : You are not wrong entirely. In my previous training I had the training disrupted and the ratio went down. I ignored it, tested the classifier, it worked as expected (actually because I had trained it for only 10 stages, it showed expected progress). I asked the question this time because of the time it takes. I am skeptical because I am a beginner.

2015-05-04 04:33:13 -0500 commented question opencv_traincascade : Acceptance Ratio- Unconsistent Behavior

@StevenPuttemans : Nope, didn't change a thing. I have had this situation a few times before!

2015-05-03 11:35:55 -0500 edited question Opencv Haar Cascade Training Advice

Hello, I have decided to train Haar classifier for flowers given here:(The dataset)
http://www.robots.ox.ac.uk/~vgg/data/...

In the link you can see many categories. I am posting a few images to explain the question.

image description

image description

image description

This flower belongs to a single class. I have 250 images as positives. There is a considerable variation in this flower's others images(of color, brightness, orientation, etc.). I am hunting for negative images right now. As you might have guessed, I didn't click these pictures so I can't go to the places where these were clicked to collect negative dataset. Instead, I have decided to extract frames from a video. Here is the link:
https://www.youtube.com/watch?v=x3zT1...

It is a video of general garden with bushes and plants background.

Here is my training with LBP features checked:

E:\_102flowers-500X500>opencv_traincascade -data classifier_water_lily -vec water_lily_vec.vec -bg negatives_water_lily.txt -numStages 20 -minHitRate 0.990 -maxFalseAlarmRate 0.5 -weightTrimRate 0.95
-numPos 4000 -numNeg 8000 -featureType LBP -w 60 -h 54 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024

PARAMETERS:

cascadeDirName: classifier_water_lily
vecFileName: water_lily_vec.vec
bgFileName: negatives_water_lily.txt
numPos: 4000
numNeg: 8000
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 60
sampleHeight: 54
boostType: GAB
minHitRate: 0.99
maxFalseAlarmRate: 0.5
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   4000 : 4000
NEG count : acceptanceRatio    8000 : 1
Precalculation time: 38.264
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5|   0.9945| 0.735375|
+----+---------+---------+
|   6|   0.9905|    0.663|
+----+---------+---------+
|   7|  0.99325| 0.577375|
+----+---------+---------+
|   8|   0.9905| 0.525875|
+----+---------+---------+
|   9|  0.99125|   0.4285|
+----+---------+---------+
END>
Training until now has taken 0 days 1 hours 50 minutes 40 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   4000 : 4035
NEG count : acceptanceRatio    8000 : 0.468494
Precalculation time: 36.739
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5|  0.99575| 0.773375|
+----+---------+---------+
|   6|  0.99075|  0.69425|
+----+---------+---------+
|   7|    0.992| 0.635875|
+----+---------+---------+
|   8|  0.99175| 0.626875|
+----+---------+---------+
|   9|  0.99025| 0.528125|
+----+---------+---------+
|  10|  0.99025|  0.52125|
+----+---------+---------+
|  11|   0.9905|   0.4675|
+----+---------+---------+
END>
Training until now has taken 0 days 4 hours 9 minutes 29 seconds.

===== TRAINING 2-stage =====
<BEGIN
POS count : consumed   4000 : 4085
NEG count : acceptanceRatio    8000 : 0.227131
Precalculation time: 37.776
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5|  0.99675| 0.878875|
+----+---------+---------+
|   6|    0.991|   0.8225|
+----+---------+---------+
|   7|  0.99125| 0.725625|
+----+---------+---------+
|   8|  0.99075| 0.739375|
+----+---------+---------+
|   9|  0.99025|  0.68475|
+----+---------+---------+
|  10|   0.9905|    0.649|
+----+---------+---------+
|  11|  0.99025| 0.618625|
+----+---------+---------+
|  12|  0.99025|  0.58475|
+----+---------+---------+
|  13|  0.99025|  0.53525|
+----+---------+---------+
|  14|  0.99025|    0.496|
+----+---------+---------+
|  15|  0.99025|    0.477|
+----+---------+---------+
|  16|  0.99025| 0.449625|
+----+---------+---------+
|  17|  0.99025|  0.42025|
+----+---------+---------+
|  18|  0.99025|  0.39575|
+----+---------+---------+
END>
Training until now has taken 0 days 3 hours 39 minutes 2 seconds.

===== TRAINING ...
(more)
2015-05-03 08:32:10 -0500 asked a question opencv_traincascade : Acceptance Ratio- Unconsistent Behavior

I was training a classifier with opencv_traincascade. I trained till 3 stages then stopped. I resumed the training after some time when I came back, I saw that when restarting the training, the acceptance ratio has changed(decreased) compared to what I saw in the half done training of 4th stage when I had to stop it.

Anyone knows, what is the issue here? Is it worth bothering?

2015-04-29 06:51:27 -0500 commented answer Help me with the opencv_traincascade training

Is neuroph a good choice?

2015-04-29 06:37:32 -0500 commented answer Help me with the opencv_traincascade training

@Gino Strato : Okay, you are 100 percent correct there. I finished training the classifier. Now, it detects my "Passion Flower" but also some other flowers and leaves too. I guess I can't go for species classification through ADA boost. Can you suggest another method for species classification on which several resources are available to learn and practice and which doesn't require a Phd necessarily?

2015-04-26 22:53:30 -0500 commented answer Help me with the opencv_traincascade training

See my EDIT for new data. Its fairly complex with many features.

2015-04-26 22:10:20 -0500 commented answer Help me with the opencv_traincascade training

@StevenPuttemans : When I said blackened, I did blacken the background then I chose -bgthresh 10 and -bgcolor 10 filtering out blackish region with opencv_createsamples. I checked it with -show and the placement of flower was without any black mask.
Also, I still want to ask you(rather confirm) that , opencv_createsamples marks my object's coordinates first then place it in the negative, it still has my object marked in the big negative background image, right?

2015-04-26 22:04:55 -0500 commented answer Help me with the opencv_traincascade training

@Gino Strato : I guess, this is part of the "learning curve" as they say. If not for this site(and SO) I would have abandoned my project and changed the topic. I am doing the training again with -numPos 4000 and -numNeg 8188 with numPos:numNeg = 1:2 approx and it is taking double the time. This time, from the starting stage there is 7 weak classifier internal stages. It is like,
Stage 0 : 7
Stage 1 : 10
Stage 2 : 14
Stage 3 : 11
Stage 4 : 17
I think it is because of the fact that, I have set -maxFalseAlarmRate 0.4

2015-04-26 03:30:04 -0500 answered a question Cascade training for closed eye detection

From my experience:

For positives : The images having the object you want to detect obviously but, try that it only contains the object you want to detect. I suppose the dataset not the "database" as you called it, will work just fine for your case.

For Negatives : The important thing is having the images which do not contain the object you want to detect but also the images depicting the scenarios where you can find the positives too. So, no random set will do. Try with open eyes. Theoretically , you are allowed to insert just any random negative image you find but practically, resulting in poor classifier. Just don't miss out the "scenarios" where they can happen.

Also, take a look at what this guy has to say, http://stackoverflow.com/questions/16...

Your training results are not "normal" as what happens in an average training case.

2015-04-25 22:26:11 -0500 commented answer Help me with the opencv_traincascade training

@StevenPuttemans : Is this "blackening" that I did sensical?
P.S : I don't have 1000 positives so gonna go ahead with 250 only. :(
So basically I am planning to use 250 positives and 8188 negatives!!

2015-04-25 22:23:56 -0500 commented answer Help me with the opencv_traincascade training

@StevenPuttemans :Okay,you were right! The classifier after 12 stages is poor. I tested it, it detected 2-3 features in each flower for positives(including one leaf-like feature) but when I tested it with negatives(bushes, ferns and other flowers), it detected one or two feature in each of them. The only reason I can attribute to this, is the presence of leafy background in my positives(every single ne of them) and untuned parameters that I chose. Well...accepted, fine! I am about to start my next iteration at training. For that, I have first "blackened" the leafy background and now this is where I am struck. I have 250 actual blackened positives. How do I generate a VEC file out of them all? opencv_createsamples utility seems to distort and mix with negatives no matter what.

2015-04-25 04:07:12 -0500 commented answer Help me with the opencv_traincascade training

Also, I want to tell you that I have 102 flower categories each having many images totaling to 8189. What I have done is used 250 out of one category and put rest of the images(of different flowers) under negatives(except the 250). Did I do this right?

2015-04-25 04:05:04 -0500 commented answer Help me with the opencv_traincascade training

Okay, first of Thank You for all the answers up until now you have given for my and everybody's questions.(I have noticed). Second, right...you said the -numNeg is no of Windows chosen by the cascade. This implies I have been in wrong impression about the parameters(due to those guides). I will continue this training but for the next iteration I am thinking about using -numPos as half of my total positive samples and numNeg as double of numPos instead of putting the actual number of images I have. Will this be okay?

2015-04-25 03:37:06 -0500 commented question Help me with the opencv_traincascade training

@StevenPuttemans : Sry for that. Will edit it in future.(I mean this one)

2015-04-25 02:08:39 -0500 asked a question Help me with the opencv_traincascade training

-------------------------------------------------------------------------------------------------------------------------------------------
EDIT : This is the data for my second try in the training after the poor classifier generated from the first stage

E:\_102flowers-500X500>opencv_traincascade -data classifier -vec samples.vec -bg negatives.txt -numStages 20 -minHitRate 0.990 -maxFalseAlarmRate 0.4 -weightTrimRate 0.95 -numPos 4000 -numNeg 8188 -fe
atureType LBP -w 60 -h 60 -mode ALL -precalcValBufSize 1024 -precalcIdxBufSize 1024
PARAMETERS:
cascadeDirName: classifier
vecFileName: samples.vec
bgFileName: negatives.txt
numPos: 4000
numNeg: 8188
numStages: 20
precalcValBufSize[Mb] : 1024
precalcIdxBufSize[Mb] : 1024
acceptanceRatioBreakValue : -1
stageType: BOOST
featureType: LBP
sampleWidth: 60
sampleHeight: 60
boostType: GAB
minHitRate: 0.99
maxFalseAlarmRate: 0.4
weightTrimRate: 0.95
maxDepth: 1
maxWeakCount: 100

===== TRAINING 0-stage =====
<BEGIN
POS count : consumed   4000 : 4000
NEG count : acceptanceRatio    8188 : 1
Precalculation time: 41.897
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|  0.99275| 0.689179|
+----+---------+---------+
|   5|  0.99625| 0.694187|
+----+---------+---------+
|   6|  0.99125|  0.50745|
+----+---------+---------+
|   7|  0.99025| 0.372008|
+----+---------+---------+
END>
Training until now has taken 0 days 1 hours 56 minutes 8 seconds.

===== TRAINING 1-stage =====
<BEGIN
POS count : consumed   4000 : 4043
NEG count : acceptanceRatio    8188 : 0.397727
Precalculation time: 37.581
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|   0.9955| 0.790914|
+----+---------+---------+
|   5|  0.99175|  0.71849|
+----+---------+---------+
|   6|    0.993| 0.640205|
+----+---------+---------+
|   7|  0.99075| 0.540669|
+----+---------+---------+
|   8|  0.99025| 0.496336|
+----+---------+---------+
|   9|  0.99025| 0.481803|
+----+---------+---------+
|  10|   0.9905| 0.392037|
+----+---------+---------+
END>
Training until now has taken 0 days 4 hours 33 minutes 30 seconds.

===== TRAINING 2-stage =====
<BEGIN
POS count : consumed   4000 : 4081
NEG count : acceptanceRatio    8188 : 0.164428
Precalculation time: 37.299
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|        1|        1|
+----+---------+---------+
|   5|   0.9925| 0.846605|
+----+---------+---------+
|   6|  0.99025| 0.682096|
+----+---------+---------+
|   7|    0.991| 0.709697|
+----+---------+---------+
|   8|    0.991| 0.665852|
+----+---------+---------+
|   9|  0.99125| 0.598559|
+----+---------+---------+
|  10|   0.9905| 0.605887|
+----+---------+---------+
|  11|  0.99075| 0.528334|
+----+---------+---------+
|  12|  0.99025| 0.484367|
+----+---------+---------+
|  13|  0.99025| 0.441622|
+----+---------+---------+
|  14|  0.99025| 0.386175|
+----+---------+---------+
END>
Training until now has taken 0 days 8 hours 9 minutes 56 seconds.

===== TRAINING 3-stage =====
<BEGIN
POS count : consumed   4000 : 4126
NEG count : acceptanceRatio    8188 : 0.0991043
Precalculation time: 42.651
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|    0.992| 0.651075|
+----+---------+---------+
|   5|  0.99675| 0.805691|
+----+---------+---------+
|   6|  0.99175| 0.533341|
+----+---------+---------+
|   7|  0.99075| 0.528212|
+----+---------+---------+
|   8|   0.9905| 0.468735|
+----+---------+---------+
|   9|  0.99025| 0.461651|
+----+---------+---------+
|  10|   0.9905| 0.403762|
+----+---------+---------+
|  11|  0.99025| 0.382145|
+----+---------+---------+
END>
Training until now has taken 0 days 11 hours 16 minutes 56 seconds.

===== TRAINING 4-stage =====
<BEGIN
POS count : consumed   4000 : 4191
NEG count : acceptanceRatio    8188 : 0.032643
Precalculation time: 37.487
+----+---------+---------+
|  N |    HR   |    FA   |
+----+---------+---------+
|   1|        1|        1|
+----+---------+---------+
|   2|        1|        1|
+----+---------+---------+
|   3|        1|        1|
+----+---------+---------+
|   4|  0.99175| 0.846727|
+----+---------+---------+
|   5|  0.99275|  0.85723|
+----+---------+---------+
|   6|  0.99075| 0.787982|
+----+---------+---------+
|   7|    0.992|     0.75|
+----+---------+---------+
|   8|  0.99025| 0.680752|
+----+---------+---------+
|   9|   0.9905|  0.62958|
+----+---------+---------+
|  10|  0.99025| 0.632877|
+----+---------+---------+
|  11|  0.99025| 0.553127|
+----+---------+---------+
|  12 ...
(more)
2015-04-24 09:39:02 -0500 commented answer opencv_createsamples correct parameters

@StevenPuttemans : Oops! I read your comment just now and I had applied Maria's formula back then, started training with 1521 positives. Since then, 4 stages have passed, and in each stage it has consumed ~1550 positives. Is it a blunder I have done? Should I restart the training? Also, the acceptance ratio right now is 0.0500841. What would be a good stopping point?

2015-04-24 02:33:06 -0500 commented question OpenCV Build process warning : field of class type without a DLL interface used in a class with a DLL interface

Anyone has/had this issue? Plz help!!

2015-04-24 02:30:19 -0500 commented answer opencv_createsamples correct parameters

Also, I have made -bgcolor 50 -bgthresh 50 because I examined the area around the flower and noted the range of gray pixels. I wonder it would work!

2015-04-24 02:28:20 -0500 commented answer opencv_createsamples correct parameters

I took your(indirectly "their" in this) advice and now by "that" formula. I have reduced the -numPos to1521. I hope it works out. With, -numPos 10000 the training failed after the zeroth stage saying error message like, "unable to get more positive samples....insufficient..."

2015-04-23 21:50:27 -0500 asked a question opencv_createsamples correct parameters

Hello, I am training a classifier for flower from the 102 flower category dataset. I followed the CodingRobin tut for eeverything,
http://coding-robin.de/2013/07/22/tra...

My first attempt at the training failed at the 0 stage disappointingly. Anyway, this time I want to tune the training parameters beforehand properly.
So, the training guide says to have -bgcolor 0 -bgthresh 0 . Can anyone take a look at few of my training samples and tell me what value should I choose or How do I find what value to choose? Is -bgcolor the value of the grayscale or actual color?
Also, I have 250 positives and 8188 negatives. I plan to use opencv_createsamples to produce 10,000 images(40 for each positive I guess). Should I go for 10,000 positives(or more or less)? image description

image description

image description

image description

image description

2015-04-23 11:07:32 -0500 asked a question OpenCV Build process warning : field of class type without a DLL interface used in a class with a DLL interface

I just installed CUDA 7.0 and generated the OpenCV makefiles for VisualStudio 2013 x64 through CMake. While building in the Debug configuration in VS2013, I have tons of warnings like these and its taking hell longer then it would normally take without WITH_CUDA checked in CMake.

I got the following:

C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface

How do I resolve the warnings??

There are many of these:

C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core.hpp(98): warning : base class dllexport/dllimport specification differs from that of the derived class
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(494): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/cuda.hpp(530): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
18>  pyr_down.cu
18>  
17>  bgfg_gaussmix2.cpp
17>  bgfg_KNN.cpp
17>  camshift.cpp
17>  compat_video.cpp
17>  ecc.cpp
17>  kalman.cpp
17>  lkpyramid.cpp
17>  optflowgf.cpp
17>  tvl1flow.cpp
17>  opencl_kernels_video.cpp
17>LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_imgproc300d.lib'
19>------ Build started: Project: opencv_shape, Configuration: Debug x64 ------
19>  Building Custom Rule C:/opencv-master_2/opencv-master/modules/shape/CMakeLists.txt
19>  CMake does not need to re-run because C:\opencv-master_2\My_Build\modules\shape\CMakeFiles\generate.stamp is up-to-date.
19>  opencv_shape_pch.cpp
19>  aff_trans.cpp
19>  emdL1.cpp
19>  haus_dis.cpp
19>  hist_cost.cpp
19>  precomp.cpp
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
13>  
13>  
13>  
19>  sc_dis.cpp
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(482): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(483): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/types.hpp(692): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(229): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(2410): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C:\opencv-master_2\opencv-master\modules\core\include\opencv2/core/mat.hpp(2411): warning : field of class type without a DLL interface used in a class with a DLL interface
13>  
13>  
13>  
13>C ...
(more)