mvondracek / VUT-FIT-POVa-2018-Pedestrian-Tracking

Computer vision system for tracking pedestrians in a scene observed by multiple cameras.
10 stars 4 forks source link

PersonView matching — matcher.HistogramMatcher(PersonMatcher) #10

Closed mvondracek closed 5 years ago

mvondracek commented 5 years ago

@xstast24, please implement PersonView matching based on histograms in matcher.HistogramMatcher(PersonMatcher). Please get in touch with @flaxh and analyse code in openpose.main.person_synchronization. Suitable interface is defined by matcher.PersonMatcher(ABC) (dbc949d5f6e361bfae3e1fc44beaf16804c2f21c). More info in #9.

mvondracek commented 5 years ago

class PositionBasedHistogramMatcher(PersonMatcher) FIXME Edit the following note... This is just note to describe an idea Matching based only based on histograms may be not enough. Imagine cam1 detected p1 and p2, but cam2 detected p2 and p3. In this case p2 would match p2 correctly, but p1 may match p3, because that is the most matching histogram for p1. To prevent that, location verification could be done based on intersection of line of sight of cam1 and cam2. If we draw line from cam1 to p1, and line from cam2 to p1, they intersects in a pointX. Then we draw circle with a center in the pointX and a diameter 50 cm. Then look at the best matchin person for p1 from cam1, that is p3 from cam2, and check if p3 is estimated to be inside of the circle (based on distance to cam2). If p3 is inside, then probably p1 == p2, if is outside, then p1 =/= p3. @xstast24 08855cf2e9f3847c6706d3191ecc16f267e63403

mvondracek commented 5 years ago

cam1 detected p1 and p2, but cam2 detected p2 and p3

Person p2 from cam1 and p2 from cam2 will match, they have very similar histogram. Person p1 and p3 will not match, because their histogram is not similar enough — there only needs to be some treshold of when two histograms are similar enough. Therefore you don't need 3D positions of the people for matching.

xstast24 commented 5 years ago

Well, the threshold should work for our testing data, but not in general. But it is a way to start, of course.

mvondracek commented 5 years ago

In this case p2 would match p2 correctly, but p1 may match p3, because that is the most matching histogram for p1.

Each camera can see different number of people, so you cannot match all histograms into pairs.

Why do you think it would not work in general? Just simple histogram similarity will not work in all cases, too. There are more robust methods linked in #4. But we need some basic method as soon as possible.

xstast24 commented 5 years ago

Ofc we can't match pairs like this, it is just a note to explain what I meant. I wanted to avoid histogram similarity threshold and have something easy but more robust, but it is not important now. I will return to it when possibly when everything is done in at least the basic version.

mvondracek commented 5 years ago

So what's the status, now?

xstast24 commented 5 years ago

It works for most of cases in testing images, it has to be tested in a whole video sequence. BUT that should be done only after we got final version of image provider and image pre-processing.

mvondracek commented 5 years ago

Good, I've seen some progress in utils/utils.py. Are you working on the preprocessing required for your implementation of matcher?

mvondracek commented 5 years ago

@xstast24, will here be any progress or should we close this issue?

xstast24 commented 5 years ago

Histogram Matcher is complete for now. It does not give reliable results and has some bugs, but image pre-processing should help it a bit.