Monday 9 March 2015

The mean shift, the background subtraction and lots of time

Over the past week and a bit I have had to re create my HoG(Histogram of orientated gradients) as I discovered I had the wrong values in it. This is currently running and will hopefully finish soon as it has been running for two days now. As well as this I have implemented mean shift to track people over a number of frames and looked at background subtraction to increase accuracy of detectors.


The various combinations of HoG detector settings come to a rough total of 20000 different combinations. These include settings such as scale between 1 and 1.1, window stride between 0 and 9 and scaling between 0 and 32. This will then be used to determine the best and most accurate settings to use for the HoG detector increasing the overall performance. An issue I had was that they were not in the correct order so I had to write a quick script to go through the lines and sort them out. Below you can see the output from the 20000 lines of combinations and results of the HoG detector on 8 test images.

As it shows best values and how many were correct and what the total offset is for that setting
This value takes a while to process an image so it may be worth searching different combinations in between. As currently, for padding which takes two numbers, I use the same one twice. So padding(6,6) rather than padding(4,8), the same can be said for window stride. This could be faster or result in a more accurate detector. This will be ran at a later date.

As well as using HoG I am also using mean shift to track the movement of people. This will be helpful in counting people when they are occluded and then picking them back up when they come into focus. An example of current progress can be seen below.

Mean shift over 10 frames trying to track top and bottom
As you can see the boxes are not that accurate or tight round the people so the tracking is not as good as I would like it to be. To try and fix this and deal with false positives like the window at the top of the image I have been looking at background subtraction. This will allow me to ignore the parts that are not moving such as the window and focus on the more likely areas to contain people. It may just still be a cat.


To also keep track of people and make sure the mean shift does not go to far away from the people I will be re checking the area to find people are still there using the HoG detector. This will be less cpu intensive as we can assume that the people, if still are in frame, will be near by so no need to check the entire image.


More graph to follow when I get them working properly :)

No comments:

Post a Comment