Sunday, March 26, 2017

Awesomeguy Android App -- 2017.03.25

I've taken a version of Dijkstra's algorithm and applied it to my Android app. The new code allows the monsters to seek out and follow the Awesomeguy character. It's an improvement to the game. I also changed the color scheme of the app. Then I released the app again on the android market.

I'm calling this new aspect of the game Helicopter Monsters. Why it needs a name I don't know. The monsters are meant to look like little helicopters some of the time and that's where the name comes from.

I'm having a problem with testing my app. I have only two devices right now. Both started out as Marshmallow devices, and when they were both M devices the app worked totally fine on both devices. Recently one of the devices updated to the N android operating system. Since then the Nougat device causes problems for my app. Knowing that this is an issue I have gone out of my way to update the code in a way that will allow it to work well.

I have not been successful, and yet I have released the game anyway. There are now only something like 20 users of the game and only one of those users is reported to be using the N operating system. Honestly I believe that the individual this figure reported may actually be me.

There were, at one point, thousands of downloads of the game. Now of the 20 or so users, only one or two users are on the latest version of the game. The rating for the game is 3.0 or so. I am not interested in the rating so much as the game has changed considerably since I first released it. It is now a different game in many ways. I have re-released it on its own merits.

Recently the Google Play admins contacted me to tell me that there was a change in the way that they represent the apps on the Play store site. They informed me that the apps all needed legal documents for all the special permissions that the app uses. The Awesomeguy app used google analytics and Google Play Leaderboards. The notification said that the two options I had were to remove the special permissions or to add legal disclaimers to the app. I chose the former. Hopefully the app will be retained on the Play Store site. I believe that the Leaderboard functionality does not require a disclaimer.

That's the state of the Awesomeguy app.

Saturday, February 25, 2017

Return To Awesome Guy - 2017.02.25

I've spent the last couple of weeks trying to implement the Awesomeguy game in HTML and javascript. The version I've been working on uses no server-side scripting. That means on a LAMP server I would be using no MySQL or PHP. It's very interesting and using HTML5 I have been able to port all ten of the original levels to javascript.

Also, this game differs from previous versions of the game in the following ways: Starting off, there's no eleventh level. In the current version of the Android game there's an eleventh level that has OpenGL objects on the screen. HTML5 doesn't do OpenGL, so the level was not included. Another thing that was included was a multithreaded routine that allowed the monsters to aggresively follow the main character around the level. The monsters can now go up ladders, down ladders, and across flooring to persue the guy. The 'follow' routines are still a little buggy and can be disabled using a optional checkbox on the game's page.

Sunday, January 15, 2017

F1 score 2017.01.15

I went on line and did a little googling about confusion matrix calculations. I took about 75 images and ran them through the program. I came up with columns in a chart for true detection of a face, false-positive detection, and false-negative detection. I followed the formula for the F1 score, not strictly speaking a confusion matrix, but interesting to calculate. I come up with a 0.44 score. It's not that good.

Wednesday, January 11, 2017

Convolution visualization 2017.01.11

Here's a graphic that visualizes the weight vector for the first convolutional layer of one of the neural networks in the facial detection project I have been working on.
There are 32 boxes and a 5x5 image in each box. This is after 5 or 6 runs of the training function.

Thursday, January 5, 2017

awesome tag revisited in python 2017.01.05

Here I include some text from the ReadMe file in one of my github projects. I previously scrapped the java version of the project, but recently I started up the project again in python, and now I like my results much more. The link to the site is here:

This is the ReadMe file, and it is followed by some screen shots.


Facial detection and tagging experiments -- this project was not working for several months. Presently, though, it does a better job of detection than it did. It does not, however, do that detection any faster than before. It presently takes several minutes for each image.
The method used for detection can be described as follows. All the code is written in python. First a program devides the image into small boxes, 7 pixels to a side. Then a simple two layer neural network is used to determine which of these boxes are areas of the image where a face might be. This layer basically detects skin tones. Then an aggregating program is used to draw together squares that are immediately adjacent. Then a more sophisticated convolutional neural network is used to determine which of these resulting boxes is actually a face.
Tensorflow is used to implement the neural networks on the author's computer using the gpu on that computer. Because Tensorflow is used there was a conflict in importing in python the TF library and the Gtk library at the same time. To get around this a separate program was created for the TF functions that is called by the gui using the 'subprocess' functionality.
When the experment was tried for the first time Java was used. This worked poorly and good results were never fully realized. The java code is included in the github repository for completeness. Also included in the repository is some python code that uses tensorflow to work on the MNIST dataset, just as is suggested by the Tensorflow 'getting started' page.
The training data that I use came from . They have a dataset of labled facial images for a facial recognition challenge (note, this is for facial recognition, not really detection). The dataset is called the 'IJB-A' dataset. The download is large and you must apply for permission to access the download page. I beleive most students of computer science would be approved, if you are clear that you are interested in research.
You are required to add the following text to any publication: This product contains or makes use of the following data made available by the Intelligence Advanced Research Projects Activity (IARPA): IARPA Janus Benchmark A (IJB-A) data detailed at .
The first step to using this project is downloading the dataset. Then the working environment must be set up. The project uses, among other things, a dot-folder in your home directory called '.atag' for storing the location of the IJB-A database as well as the location of several of its own files. Then you must train the two databases on the images in the dataset folders. Then you can go ahead and test the facial detector on the images in the database or any image of your own.

In the shot above the red box designates 'detection'. Here the computer has trouble with the cork board in the background.

Here I use one of the stock photos from the downloaded database of photos. Several faces are detected, and one or two are not.

Saturday, November 12, 2016

Finding a Path 2016.11.12

I haven't blogged here in a long time. Here's some info about a project I've been working on.

Recently I've been toying with Google's Tensorflow python library. I've written an op for the cpu and the gpu. The op, of course, is a modified version of the Dijkstra algorithm. The funny thing is that the cpu version works faster than the gpu version. There seems to be a long overhead time, something like 7 seconds, before a gpu op begins to work. There is also a size restriction. My op works on grids. On the cpu version I can use a large grid. I've tried 480x480. On the gpu the op fails if the grid is larger than 70x70. What do I come away with? Well, I enjoyed doing the gpu version, but the cpu version ends up being superior.

So, the code is here:

I also use pygame to construct my gui for testing with real png images.

Thursday, July 28, 2016

awesome-audio-cnn 'brain' file

In the last post I mentioned that I was making public a github project that I've been working on. The project is called 'awesome-audio-cnn' and it uses a neural network to select music for automatic playback on a simple server. The project '' file suggests that you train your own neural network file for the server. On reflection I thought this was too difficult.

I have included in the git repository (mentioned in my last post) a file for operating the neural network that is at the heart of the awesome-audio-cnn project.

The file is 23.9M in size, so it will take a long time to download. What this means is that you don't need to train the neural network yourself. It allows you to get a faster start up. I should note that the file was developed at my location, on my audio collection. It may not act as you expect on your files. There is no provision, incidentally, for comparisons on the basis of tempo. The songs you get out of this neural net will not be the same with respect to tempo.

The inclusion of this file may mean that some with slow internet connection or limited disk space cannot use this project.

That said, someone with time on their hands might enjoy setting up this kind of server. The info in the file is provided on an 'as is' basis, without warranties or conditions of any kind.

The file is called 'fp-test.bin' and it is located in a folder called 'acnn-brain', for lack of a better title.