Skip to content
Permalink
Browse files

License and page title

  • Loading branch information...
s32x committed Mar 10, 2019
1 parent e2f94eb commit 3897b59017bfc755917be59ca1cc410b94a25463
Showing with 118 additions and 19 deletions.
  1. +39 −0 .circleci/config.yml
  2. +6 −6 Dockerfile
  3. +29 −0 LICENSE
  4. +38 −1 README.md
  5. +6 −12 service/templates/index.html
@@ -0,0 +1,39 @@
version: 2
jobs:
build:
working_directory: /go/src/s32x.com/gamedetect
environment:
- DOCKER_TAG: s32x/gamedetect
- HEROKU_APP: gamedetect
docker:
- image: circleci/golang:1.12
steps:
- checkout
- run:
name: Download Tensorflow
command: wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
- run:
name: Untar Tensorflow
command: tar -C /usr/local -xzf libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
- run:
name: Download vendored Go dependencies
command: GO111MODULE=on go mod vendor
- run:
name: Run unit tests
command: make test
- setup_remote_docker
- run:
name: Build Docker image with binary
command: docker build --no-cache -t $DOCKER_TAG .
- run:
name: Login to DockerHub
command: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run:
name: Push image to DockerHub
command: docker push $DOCKER_TAG
- run:
name: Install the Heroku CLI
command: curl https://cli-assets.heroku.com/install.sh | sh
- run:
name: Deploy the app
command: make deploy
@@ -8,9 +8,9 @@ COPY / .
# Dependencies
RUN apt-get update -y && \
apt-get upgrade -y
RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN tar -C /usr/local -xzf libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN rm -f libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz && \
tar -C /usr/local -xzf libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz && \
rm -f libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN export GO111MODULE=on && \
go get github.com/ahmetb/govvv && \
go mod vendor
@@ -25,9 +25,9 @@ FROM ubuntu:latest
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y wget
RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN tar -C /usr/local -xzf libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN rm -f libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz
RUN wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz && \
tar -C /usr/local -xzf libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz && \
rm -f libtensorflow-cpu-linux-x86_64-1.12.0.tar.gz

# Graph/Labels files
COPY graph /graph
29 LICENSE
@@ -0,0 +1,29 @@
The BSD 3-clause License
========================

Copyright (c) 2019, Steven Wolfe. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of gamedetect nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -18,4 +18,41 @@ For example:
curl -X POST https://gamedetect.io -F image=MY_GAME_SCREENSHOT.png
```

Excited yet? I sure am! gamedetect is a fun project I've been playing with in my free time to learn about Computer Vision, Neural Networks, and Tensorflow. It's sort of my own hello world app that also could potentially serve a real use-case on Twitch or any other streaming platform that requires broadcasters to categorize their stream. That being said, I'm still very much a beginner to all of this and I'm sure I'm doing a number of things wrong - feel free to let me know in the issues if you'd like.
Excited yet? I sure am! gamedetect is a fun project I've been playing with in my free time to learn about Computer Vision, Neural Networks, and Tensorflow. It's sort of my own hello world app that also could potentially serve a real use-case on Twitch or any other streaming platform that requires broadcasters to categorize their stream. That being said, I'm still very much a beginner to all of this and I'm sure I'm doing a number of things wrong - feel free to let me know in the issues if you'd like.

### Running with Docker
To start using IPData via Docker, install Docker and run `docker run`:
```
docker run -p 8080:8080 s32x/gamedetect
```
This will retrieve the remote DockerHub image and start the service on port 8080.

The BSD 3-clause License
========================

Copyright (c) 2019, Steven Wolfe. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

- Neither the name of gamedetect nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,26 +1,20 @@
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<html>

<head>
<title>gamedetect | Game Detection/Identification</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Styles -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" />
<link rel="stylesheet" href="assets/css/site.css" />
</head>

<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="ui padded container">
<h1>Identifying Gaming Livestreams with Tensorflow and Go</h1>
<p>Using Tensorflow for image classification is</p>
@@ -41,7 +35,7 @@ <h2>Some other Heading</h2>
</div>

<div class="ui padded container">
<h2>Example Result</h2>
<h2>Sanity Tests</h2>

{{range .tests}}
<div class="ui segments">
@@ -64,7 +58,7 @@ <h2>Example Result</h2>
<tbody>
{{range .Predictions}}
<tr {{if (gt .Probability 0.80)}} class="positive" {{end}}
{{if (lt .Probability 0.10)}} class="negative" {{end}}>
{{if (lt .Probability 0.20)}} class="negative" {{end}}>
<td>{{.Label}}</td>
<td>{{.Probability}}</td>
</tr>

0 comments on commit 3897b59

Please sign in to comment.
You can’t perform that action at this time.