Create an AI that can accurately predict mobs in the player’s field of view from gameplay screenshots. Using this information, create an AI that finds and labels mobs in a superflat world.

Tasks:

  1. Analyze image and draw a box around all mobs
  2. Classify each mob from these boxes
  3. Map this box center in the 2D image to a mob in the superflat world
  4. Label the mob in the superflat world with its predicted label

Technologies Used

  1. OpenCV
    • image manipulation
    • haar cascades
  2. Tensorflow
    • convolutional neural networks
  3. Scikit-Learn
    • several out-of-the-box ML models (KNN, RandomForests, etc.)
    • data splits/testing
  4. Project Malmo
    • API to interact with the Minecraft world

Malmo Environment

Auto-cropper Tool

Process to take images of single mobs and crop out just the mob

  1. Original Image
  2. Remove background [original img with blk background]
  3. Remove noise [removal of specs]
  4. Edge detection [show edges]
  5. Merge contours and crop original image

Dataset Creation

Our process for obtaining an image dataset of 1000 images for each mob

  1. Spawn superflat world with a single mob
  2. Hold a photoshoot of the mob (screenshots of different angles and distances)
  3. Crop mob, apply image manipulations, and save each image

We saved each cropping with the following variations

Examples of dataset

Dataset directory structure

chickens/
chickens/originals
chickens/cropped
chickens/cropped/color
chickens/cropped/color/24x24
chickens/cropped/color/30x30
chickens/cropped/edges
chickens/cropped/edges/24x24
chickens/cropped/edges/30x30
...
cows/
mushroom_cows/
pigs/
sheep/