dbolkensteyn / BeatTheBotChallenge

Come challenge the bot playing a moto racing phone game, see how it is made, and help to improve it!
3 stars 2 forks source link

Add non-regression unit tests for the moto detection algorithm #4

Closed dbolkensteyn closed 9 years ago

dbolkensteyn commented 9 years ago

Here is how I believe it can be done:

  1. Manually extract the moto out of each photo webcam_i.png from the database into moto_i.png
  2. Because moto_i.png is a sub-image of webcam_i.png - we know that we can find an exact match of it in the original photo and find its expected coordinates using Template Matching OpenCV functions
  3. This means that we can use supervised training methods
  4. Pick an arbitrary subset of moto images as training set
  5. Pick the remaining (that is, excluding webcam_i.png if and only if moto_i.png is part of the training set) photos as testing set
  6. Run the moto detection on each photo of the testing set. Compare its expected coordinates against its actual one (found as described hereabove).
  7. Set an arbitrary distance between the points as a way to distinguish a match from a mismatch

From there, one can do multiple things:

  1. Work on the moto detection algorithm to improve its accuracy
  2. Try to boost the performances of the algorithm, for example by minimizig the training set

There might be more advanced approaches, but this approach should have a high ROI.