OpenCV + Artificial Neural Network

asked 2018-09-12 16:36:17 -0500

Krunch gravatar image

Translated text

I am trying to detect patterns in video images, for this I am using optical flow and collecting the movement of the pixels in a certain region and after that I want to train an MLP to recognize. I switched from digital image processing to digital signal processing.

These values ​​refer to the displacement of each pixel, frame by frame. Small sample of the movement of the pixels in Y and X.

When collecting the values ​​of a video of 3 seconds, it returns about 5000 values. I have several videos with actions that represent what I want to recognize and others with similar actions but do not represent what I want, and all these videos served to train the MLP.

Using R, I plotted the values ​​of a video of 3 seconds, the following image shows the behavior / displacement of the pixels.

My question: How can I train the MLP network, because all the training I have already done was of time series. In this case I need to gather all the data and inform when the values ​​represent the action and when they do not represent (1 and 0) through a supervised training.

How can I model this data and report that the entire 5000-values ​​group represents the action I want using the R language?

edit retag flag offensive close merge delete


" I want using the R language?" -- sorry, but in this case you're wrong here. opencv is a c++ library (with python & java wrappers)

berak gravatar imageberak ( 2018-09-13 00:48:52 -0500 )edit

I used C ++ to collect the data I needed, this part is ready. But I can not think of a way to put the data into a single vector and indicate that they are referring to the action I want to train the neural network.

Krunch gravatar imageKrunch ( 2018-09-13 00:55:07 -0500 )edit

oh, please show, what you have, so far !

there are several MLP examples on this site. can you try to look at some of those, try out a few things, and refine the question ?

you will need to setup your data into a singe float Mat, with N rows (one per train sample) and M cols(10000 values for 5000 x,y pairs) you also need a N x NumClasses hot-encoded responses Mat.

berak gravatar imageberak ( 2018-09-13 01:00:41 -0500 )edit