Logo

About

Artificial intelligence

Combining data

Cybersecurity

Cyberweb information

WordPress exploit

Author

Arjan Neef

Testing, research and development

Artificial intelligence

Information is everywhere, sometimes right under your nose but you just don't see it. And then there is AI, it will help you make sense of it al, for some people a magical trick that somehow works. And for me? I'm just wondering if AI is hyped, wishful thinking or really something that is there to help us. The only way for me to answer this is to dive into it, perhaps develop my own simplified version and see where it takes me. On this page you can read about experiences and hopefully help you in your quest into AI as well.

As you can image I cannot ignore artificial intelligence. I just need to understand it before it can be of any use to me. That's why I started the NeuroMath project.

NeuroMath

With NeuroMath I wanted to see if AI could detect objects on satellite images and classify them. Due to the current instable situation on the world I wanted to focus on objects that could pose a thread such as fighter planes and other military objects. So I started to develop an algorithm that could identify objects on a satellite photo using a neural network. Self learning neural networks are considered artificial intelligence so this would be a good place to start. And so it began.

Satellite images are quite large, approximately 200 Mb for an area of 5km wide and long (as shown in the image). Objects the AI needs to locate are much smaller. To put in perspective, the size of a fighter jet is only about 50x50 pixels wide, while the entire satellite image is 10000x10000 pixels. Theoretically about 40000 planes could fit in the satellite image.

An AI cannot process the whole satellite all at once, it needs to divide the image into smaller pieces. Each piece is then analysed to see if it contains a positive hit. It looks at the shape, colour and other visual aspects to identify (or disqualify) these small images. Not only does it need to know what a fighter jet looks like, it also needs to know what a fighter jet doesn't look like. Otherwise it cannot distinguish a fighter jet from a tree or a house. Every cropped image from the satellite image will be compared to all known images containing positive and negative results. This comparing is done using a neural network that basically represents all learned images. This network has been trained with many positive and negative images and uses this information to confirm or reject an image.

Training the network

After quite some training rounds the accuracy of the network was tested. It turned out that the AI performed badly resulting in many false positives when analysing trees or factory grounds. This greatly improved after preprocessing all images to better distinguish edges, colour variances and contrast. Basically the eyes of the AI were enhanced.

After a fully trained AI was available it still resulted in many false positive tests. Another improvement was added by comparing all images slightly around the original, if all these images are also positive it must be good. With this optimalisation in place analysing an image becomes a bit slower but far more accurate.

To keep the AI training while being used another option was been added. This option allows adding more verified results during a training session to keep tuning the AI. There is no need to fully reset the memory of the AI, you just add more data into it on the fly. With this, the AI is continuously training and gets better and better while used. Resetting the memory of an AI means it has to start all over again, taking valuable time.

The AI model itself

The model contains different parts. The first part of the model selects a small image from the satellite image to process. It then sends this image to a computer to analyse. To improve the analysing speed multiple computers can be connected together to simultaneously work in parallel. Every computer will first enhance the image, then analyse it and send the result back to the main computer. More computers mean faster results.

Neural network

The neural network can be compared to the structure of our brain. It contains neurons and connections, but then purely mathematically. The processed image is fed into the network and the network will determine how much the image looks like a fighter jet or not. At first the network (or AI) will perform very badly as it has never been trained. The cleverness of the network relies on all connections between the neurons in the network. Every connection represents a small fraction of the entire solution. During the training session these fractions are slightly altered to come up with a better solution next time. This is actually the learning process. If adjustments made the total accuracy worse, this was a bad adjustment. If the accuracy of the network improves this was a good adjustment.

The size of the network will determine the total time it takes to analyse a picture. The current network contains about 4437573632 connections, and every training set contains around 100000 images. To analyse all this a whopping 443757363200000 multiplications and additions need to be calculated. Computers are fast, but this still takes time, especially on my dated computers. And that is only 1 training session, a good performing network requires atleast 3000 training sessions to actually show any significant improvement. As you can image, this is still a big task.

Development of the AI

Due to my background as software developer I was able to write the entire algorithm from scratch myself. Although there are plenty of available AI solutions out there I wanted to fully understand how it all works. The only way to achieve this is to build everything from the ground up. Not only did this give me many insights, it also gave me a better understanding of the limitations and possibilities that come along. Because of this I can also add features to the model that would otherwise be a lot harder to implement, if not impossible.

One of the features I was able to add is to create a link between a database, a website and the AI in a fully integrated manner. Thanks to all this the NeuroMath application came alive, a result Im proud of.

Challenges

Ofcourse not everything went smoothly, like any other project this project also had its challenges. I'll list the most important challenges I had to conquer.
  • Make sure the images are properly filtered and preprocessed to avoid false positives. It took quite some time and fiddling around to get an acceptable "one fits all" solution.
  • The size of the neural network is important. A small network might not work and a large network would take ages to train. But what is a best size?
  • I do not have a supercomputer so I had to tweak, optimize and redesign certain processes and methods to get a result without weeks and weeks of waiting for a result. For this I've used manually designed parallel processing methods and merged 4 cheap desktop computers into one.
  • How to tune the algorithm while it's active, add more data into the algorithm without needing to reboot the whole process.
  • Avoid false positives, and I've seen a lot of false positives.

NeuroMath, by Arjan Neef