This application is able to recognize the SET cards and to play the classic game. It is composed up from three parts:
- Server side application (created by using Spring Framework)
- Android application
- Web application
Set is a real-time card game published by the Set Enterprises in 1991. The deck consist of 81 cards varying in four features:
- number (one, two, three);
- symbol (diamond, squiggle, oval);
- shading (solid, striped, open);
- color (red, green and purple);
A set consist of three cards satisfying all of the following conditions:
- They all have the same number of symbols or have three different number of symbols;
- They all have the same symbol or have three different symbols;
- They all have the same shading or have three different shadings;
- They all have the same color or have three different colors;
For example these three cards form a set:
This application is composed up by two main part:
- server part - recognizes the image and check if a SET is present on the cards
- client part - uploads a picture and presents the results
Let's see how the android application works:
- First you have to take a picture and send it to the server;
- The server processes your image and sends back the response what will be presented by the client application;
Before compiling the server project, you have to do the following steps:
- Step #1: Change the configuration parameters in the
src/main/resources/application.yml
configuration file; Change the host and port settings acccording to your server settings. If you run the server on localhost you can run theifconfig
command on linux oripconfig
command on windows in order to obtain your ip address. - Step #2: Download the frozen graphs from my Google Drive here. Create the
graph/YOLO
directory under the/server/
root and rename the yolo-voc_19500.pb file to yolo-setcards.pb. - Step #3: From the
/server/
root directory open a terminal window and type the following command:
./gradlew clean build -xtest
./gradlew bootRun
Now, you can open the http://localhost:8080 and you should be able to upload and recognize cards. It should look like this one:
- Step #1: modify the configuration file: Config.java
Change the host and port to point to your server. It can be either a domain or an ip address. If you run the server on localhost you can run the
ifconfig
command on linux oripconfig
command on windows in order to obtain your ip address. - Step #2: open the project in Android Studio, connect your device to your computer and run the application. You can also build the mobile project with Gradle.
I reused some parts of my previous project to create this one: