DeepOverwatch — combining TensorFlow.js, Overwatch, Computer Vision, and Music.

Farza
Farza
May 5, 2018 · 11 min read

Get The Code/ Trained Model

What is Mood?

The Problem

Possible Solutions

Neural Networks

Training Data

First record the clip.
Then rename the clip to reflect the character played in the clip.
Finally, crop out just the gun from the clip and save the clip as individual images. I simply kept track of the label of each image by saving the images in folders named after the label.

TensorFlow.js

Model

Model I came up with that predicts 27 classes since there are 27 heroes in Overwatch.
yay!

Almost Done

const loadModel = async () => {
console.log(“Loading Model…”);
model = await tf.loadModel(INSERT_S3_LINK_HERE);
console.log(“Model loaded!”);
setInterval(startScreen, 500);
}
const logits = tf.tidy(() => {
const b = tf.scalar(255);
const img = tf.fromPixels(imgElement).toFloat().div(b);
const batched = img.reshape([1, 40, 85, 3]);
return model.predict(batched);
});

Final Observations

me celebrating

Farza

Written by

Farza

deep learning engineer. follow me on twitter @farzatv.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade