kukuruza / City-Project

Analyze traffic given a set of optical cameras in urban areas
0 stars 0 forks source link

Candidates for detection #32

Closed satwikkottur closed 9 years ago

satwikkottur commented 9 years ago

Selecting candidates is an important step in converting the task of detection into classification.

Following are tried:

  1. Following R-CNN, Selective Search: Since this is designed for generic internet images, it doesn't take into account the background and geometry. Ignores a lot of relevant candidates.
  2. Size map based: Results in huge number of candidates.
  3. Size map - Background based: Further refinement is to check for minimum occupancy by the foreground.

Resources

  1. Crisp boundaries
  2. Segmentation using CNN
kukuruza commented 9 years ago

BTW, caffe has this link for SelSearch in python - https://github.com/sergeyk/selective_search_ijcv_with_python

satwikkottur commented 9 years ago

Background based occupancy filtering implemented. Check candidates/CandidatesSizeMapDemo.m for details.

kukuruza commented 9 years ago

Thanks! I'll try all 3 once we figure out the deployment

kukuruza commented 9 years ago

Writing candidates to DB is revised and works with commit 2d60cb4fa6458c5541f85b91c490e80241605df9. Function filterCandidatesBackground.m was moved to CandidatesBase from CandidatesSizemap, and now is used in all algorithms. SelSearch produces terrible candidates as of now. It's clear even without evaluation.

satwikkottur commented 9 years ago

Can you please document the database structure here? It keeps changing causing confusion and inconsistencies.

kukuruza commented 9 years ago

Sure, sorry for the confusion. How about I put it to the README.md and will keep it updated?

satwikkottur commented 9 years ago

No worries :)

kukuruza commented 9 years ago

Both candidate types capture around half of the patches (very approximate, just by looking at them). Looks like we need to come up with some better combined method.

38 will try to learn region proposal but it lacks geometry.

satwikkottur commented 9 years ago

Even the background based method is not able to give reasonable candidates ?

Secondly, did you finish correcting DatabaseWriter ? Or is it still left to be corrected ?

If yes, I will try to access background video and save background filtered candidates.

kukuruza commented 9 years ago

Even the background based method is not able to give reasonable candidates ?

Nope, The Sel-Serach ones tend to take only a part of car in to a candidate, or a much bigger patch

Secondly, did you finish correcting DatabaseWriter ? Or is it still left to be corrected ? If yes, I will try to access background video and save background filtered candidates.

Everything is done in respect to DatabaseWriter. That is, the background filter works fine. The sizemap-based candidates are not flexible enough to adjust to variations of sizes and positions. And if you did adjust, there would be so many of them.

satwikkottur commented 9 years ago

What exactly do you mean by adjust to variations in size and position ? Isn't the sizemap an inherent want to link position and size ?

Perhaps, we wouldn't be doing a great job with respect to buses, trucks, etc. but the average traffic of cars might still be better compared to SelectiveSearch. Your views ?

kukuruza commented 9 years ago

On the second look at sizemap results I see it a little better, but recall is totally not 100%. Right now I feel the problems with sizemap algorithm is that 1) it gives bigger boxes usually, 2) some cars look displaced to the lane map, 3) on the image border it's difficult It's easier to show I think. Commit 197c89f9c7bce07dd2b6d61f852380365f983ef2 brings file src/learning/examples/EvaluateDetections.py. If you run it as is, you will see candidates (red) and ground truth (blue).

I also realized I made a mistake and didnt commit src/candidates/DatabaseWriterDemo.m and src/io/DatabaseWriter.m before. That's why you asked about them in your comment, and I couldn't understand:) They are committed too now.

kukuruza commented 9 years ago

Yo, selective search kind of candidates are inherently present in Faster-RCNN. For this reason, probably further work in this area should probably be done inside Faster-RCNN package. @satwikkottur, what do you think?

satwikkottur commented 9 years ago

Makes sense. Selective search is definitely the best way to go in our scenario. Might have to pursue this direction. Quite interesting actually.

kukuruza commented 9 years ago

Closing this issue as candidates are a part of Faster-RCNN