Classification method invariante to rotation and machine learning

asked 2019-07-13 06:10:25 -0600

updated 2019-07-13 06:11:35 -0600

I want to create a valve detection and classification like this video : https://www.youtube.com/watch?v=VY92f... to detect the positions Open and close and intermediate of the valve.

I have done some research and I have found some methods to resolve this problem, like HOG (Histogram oriented gradient) + SVM/ANN but HOG is not rotation invariant feature.

And I find there is an invariant descriptors to rotation like (SIFT,SURF,ORB,...), my question is : are SIFT or SURF goining to work in my example and if i can use them with SVM or ANN like HOG? and how many images i have to add to database ?

And thank you

edit retag flag offensive close merge delete

Comments

1

The three descriptors you mentioned should do the trick, however the first two are patented (so I guess you can't sell a program if you use them without paying royalties), the third one is free, but less precise. You could detect the keypoints in an image and find the best match to a number of reference images depicting open and closed valves. This might fail, however, if the valves are going to be very diverse. But if you want to identify the same kind, it could work. If you want a general valve detector, you should go for a deep network (like yolo, for example), I guess.

Witek gravatar imageWitek ( 2019-07-13 16:20:49 -0600 )edit
1

Thank you very mush for the information, yes, i want to sell the program, i don't know before that SIFT is not free for commercial use. yes i have diverse vannes, for now I think I'm not going to create an appllication for all valves, i am going to create a database for each valve,please i have more questions about keypoints, I didn't see yet how keypoint exactly works, but if i understand well this is the algorithm that can resolve this problem :

-Create a database for each class : Open, close, intermediate -Extract keypoint of the images. -Train svm or ANN (or maybe use Kmeans to separate the 3 classes) -Test : for each frame of the video creates a window (i don't know the size i have to chose) to search if there is a match between the result of training and the video stream.

Kitnos gravatar imageKitnos ( 2019-07-15 02:44:11 -0600 )edit
1

My questions :

-Do i have to create a 4th class annd name it "Nothin detected" for example?

-Before doing the training step do you have any suggestions for images pre-processing to do, to extract only the valve, i thought about the Canny filter but it extracts the background also.

Kitnos gravatar imageKitnos ( 2019-07-15 02:44:26 -0600 )edit
1

In your case go for Yolov3 or SSD deep networks. This is the most promising solution and the final code will be quite simple. Take thousands of images of different valves in different lighting conditions and at different angles, label them and start training. After a couple of days or a week you will have a good valve detector. You need a good gaming computer for that (Nvidia GPU is required for training).

Witek gravatar imageWitek ( 2019-07-15 03:28:49 -0600 )edit

The problem i can't, i have to use only Opencv with C++

Kitnos gravatar imageKitnos ( 2019-07-15 03:52:46 -0600 )edit
1

Sure you can. OpenCV DOES SUPPORT several deep networks, including Yolo. If you have an Intel GPU, it will run fast, if you don't it will use the CPU, so it is going to be relatively slow, but I don't think that waiting even a second for your valve to be identified is such a big problem. Only training has to be done on a GPU, unless you want to wait for months to finish.

Witek gravatar imageWitek ( 2019-07-15 17:14:23 -0600 )edit

thank you, I learned a lot from you. I want to add the program to a tablet, do you think it would work without problems with YOLO?

Kitnos gravatar imageKitnos ( 2019-07-16 04:22:35 -0600 )edit

You're welcome. If you want to use it on a tablet, go for Yolov3-tiny which is much less computation expensive and requires less memory. It is slightly less precise though, but running a full Yolov3 on a tablet may take several seconds for one image (depending on the net resolution and the CPU of the tablet, of course).

Witek gravatar imageWitek ( 2019-07-16 04:40:33 -0600 )edit