Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 2.24 KB

README.md

File metadata and controls

26 lines (20 loc) · 2.24 KB

godot-image-classification

This is a simple Godot project to show that image classification can be used within the godot game engine!

Find the full project Here! This link has Git-LFS support to get the full project.

Classification Model

Built off a Pytorch implementation of a convolutional neural network found HERE. Trained on the Kaggle Cats-vs-Dogs dataset.

Loading the model into Godot

  • Prertrain using the linked CNN and place it within Godot project
  • Use the Godot 3.5 extension called PythonScript
  • Use Scripts/pyfiles/NetworkNode.py to load the pretrained model file within the engine
  • WARNING - the project won't work without this extension and a little extra set up

Godot Game Environment

The game environment is a simple maze environment where the player can walk around in a first person view and right click to take a screenshot. The screenshot is then set to the model and the model will classify if the contents within the image are a cat or dog. The model wasn't trained to handle extra pixels due to backgrounds such as the red brick wall which may cause faulty results. This is more of a demonstration of using image classification within a game instead of a game.