TrafficSign_LightDetection icon indicating copy to clipboard operation
TrafficSign_LightDetection copied to clipboard

project only sign detection

Open ghost opened this issue 9 years ago • 13 comments

Can

ghost avatar Apr 06 '16 07:04 ghost

This project can be applied to make traffic light and traffic sign recognition synchronously. Since you are not using the camera,you can test video by using void openMP_MultiThreadVideo() in the main function, if you want to run the traffic light and traffic sign detection synchronously, you can change the macro define OPENMP to 1. There are some training XML files that I haven't upload, but you can train samples by yourself and get the XML files. @sainisanjay

JayYangSS avatar Apr 06 '16 07:04 JayYangSS

The OS is windows and I used the opencv2.4.8. The libraries of the camera(FlyCapture SDK) may need to build the project. Of course, you can remove the camera code to build this project. @sainisanjay

JayYangSS avatar Apr 06 '16 14:04 JayYangSS

You can remove the directory:HungarianAlg,KalmanFilter,Tracker. Drogonfly_ImgRead.h and Drogonfly_ImgRead.cpp can be removed, meanwhile, the function void openMP_MultiThreadCamera() can be removed if you don't use camera. And you can remove void TSRecognitionPerFrame(IplImage *frame,float *TSRSend) if you are just interested in traffic light detection. @sainisanjay

JayYangSS avatar Apr 12 '16 09:04 JayYangSS

I'm sorry that I've forgotten to tell you that you should use componentExtractionTL instead of componentExtraction. @sainisanjay

JayYangSS avatar Apr 28 '16 12:04 JayYangSS

I don't know the content in your Main_test.cpp, i think the unresolved external symbol is lost in your Main_test.cpp, in the Main_TrafficSignRecognition.cpp, you can see the definition of these variables:

deque<float> TLFilters[3];
int TLCount[3]={0,0,0};//for filtering
int TLCountThreshold=10;//if the target is lost more than 10 frame, then regard it as disappear

@sainisanjay

JayYangSS avatar May 04 '16 06:05 JayYangSS

What do you mean the output window automatically closed immediately after compilation is comes from componentExtrationTL.cppfunction? You mean you still can't finish the compliation? Or you have finished the compilation but can't run the program? @sainisanjay

JayYangSS avatar May 09 '16 06:05 JayYangSS

You can step into this function and see what happens. Find the place where it will be stopped in this function.

JayYangSS avatar May 09 '16 06:05 JayYangSS

This function is judge whether the window is traffic light by SVM classifier, since you did't use the SVM training method, you can comment int DetectResult=isTL(srcImage,iRect); in the RectangleDetection.cpp and just let DetectResult=1. However, it will increase the false positive.

JayYangSS avatar May 09 '16 07:05 JayYangSS

I use the SVM classifier to make a further check so it can reduce the false positive remarkably. If you don't want to use SVM, you need make more constrains to reduce the false positive. You can change the color threshold for your video test.

JayYangSS avatar May 12 '16 07:05 JayYangSS

@sainisanjay I trained a SVM classifier to judge whether it is a traffic light, in this way, you can reduce the false positive. You need prepare some TL positive samples and some background as negative samples.This project doesn't handle the yellow traffic lights.

JayYangSS avatar May 24 '16 04:05 JayYangSS

@sainisanjay Hard negative samples is the wrong detection of the detector, you can treat it as the negative samples. The format of positivePath.txt is the list of the image name like this:

D:/JY/JY_TrainingSamples/positive/1.jpg
D:/JY/JY_TrainingSamples/positive/2.jpg
.
.
.

JayYangSS avatar Aug 17 '16 13:08 JayYangSS

'isTL.xml' is the SVM classifier that determine whether a object is Traffic Light. You can use some traffic lights as positive examples, and some related background as negative samples. In this project, I use 'HOGTrainingTrafficSign(isTLVerticaPath, myHOG_vertical, isTLNum, HOG_TLVertical_Width, HOG_TLVertical_Height, "src//isVerticalTL.xml")' and 'HOGTrainingTrafficSign(isTLHorzPath, myHOG_horz, isTLNum, HOG_TLHorz_Width, HOG_TLHorz_Height, "src//isHorzTL.xml")' to train SVM classifier for vertical TL and horizental TL. @sainisanjay

JayYangSS avatar Aug 27 '16 00:08 JayYangSS

Hi, I've uploaded the training samples on master branch, and the description in readme @sainisanjay

JayYangSS avatar Sep 28 '16 05:09 JayYangSS