Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
logalyst authored Dec 18, 2024
1 parent 21f9699 commit b71a636
Showing 1 changed file with 132 additions and 50 deletions.
182 changes: 132 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,87 +1,189 @@
![Current build status](https://github.com/NormanTUD/asanAI/actions/workflows/main.yml/badge.svg?event=push)

# Dedication
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/asanAI_logo.png" alt="Loading"/>
</p>

This software is dedicated to my mother, who died on the 31st of march 2022 after a long and brave fight against cancer.
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/dedication.png" alt="Loading"/>
</p>

# What is asanAI?

asanAI is a no-code, offline-first machine learning toolkit which runs in any modern browser.

![Overview](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/1_loading.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/1_loading.gif" alt="Loading" width="600"/>
</p>

All global options can be adjusted from the foldable ribbon at the top of the page.
There is even a "Dark mode" :)

![The ribbon](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/2_ribbon.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/2_ribbon.gif" alt="Ribbon" width="600"/>
</p>

A neural network can be designed simply using the layers structure from the panel on the left.
An instant visualization of the network structure enhances understanding.

![The layers](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.1_Layers.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.1_Layers.gif" alt="Layers" width="600"/>
</p>

Layers are shown in their semantical categories.
Each layer has its own set of internal configurations which is accessible from the `Settings` button in each layer.

Unless the *Expert mode* being activated (from the top robbon), various guiding mechanisms assist users in their decision.
e.g., mismatching layers cannot be selected, wrong values will be highlighed, etc.

![Layer settings](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.3_LayerOptions.gif)
![Beginner mode](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.2_Beginner_Help.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.3_LayerOptions.gif" alt="Layer settings"/>
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/3.2_Beginner_Help.gif" alt="Beginner mode"/>
</p>

Once the network and input data are ready, the training can be starting by clicking on the *Start training* button from the top ribbon.
During the training, the internal process and progress of the network can be tracked.

![Training](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4_Training.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4_Training.gif" alt="Training" width="600"/>
</p>

For simple networks, in addition to general visualizations, the *Math Mode* offers a detailed (and live) look at the underlying calculations in each layer.

![Math mode](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4.2_mathmode.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4.2_mathmode.gif" alt="Math mode" width="600"/>
</p>

As soon as the training process begins, the progress of the model can be tested on the *Predict* tab.
For image data, the testing can be done via uploaded photos, drawing directly on the screen, or live camera stream.
For text data, the test data can be either uploaded as a file or being directly inserted in the text area.

![Live prediction](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4.2_prediction.gif)

<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/4.2_prediction.gif" alt="Live predictions" width="600"/>
</p>

Beside the default test datasets, users can upload their own data in *CSV*, *Image*, or *Tensor* formats.
Several assistances suppor the input process and facilitate the data upload (data never leaves the local computer).

![Own data](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/5_OwnData.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/5_OwnData.gif" alt="Own data" width="600"/>
</p>

Similar to the default sample dataset, the live prediction for users data can be initiated in parallel, as soon as the training process is started.

<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/5_OwnData_prediction.gif" alt="Own data predictions" width="600"/>
</p>

Similar to the default dataset, the live prediction for users data can be initiated in parallel, as soon as the training process is started.
To enhance explainability, additional visualization tools can help inspect internal weight matrices, activated neurons, or input data using GradCam representation.

![Own data predictions](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/5_OwnData_prediction.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/6_weight_matrix.gif" alt="Weight matrix" width="600"/>
</p>
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/8_ownDataActivation.gif" alt="Owndata activation" width="600"/>
</p>

![Wight matrix](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/6_weight_matrix.gif)
At every stage of design, training, and verification of models, the automatic generated python code can be downloaded.
In addition, the training data as well as the model structure and weights can be downloaded as separate files (from the top ribbon).

![Code](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/7_code.gif)
<p align="center">
<img src="https://github.com/NormanTUD/asanAI/blob/master/documentation/images/7_code.gif" alt="Code" width="600"/>
</p>

![Owndata activation](https://github.com/NormanTUD/asanAI/blob/master/documentation/images/8_ownDataActivation.gif)

# How to use asanAI?

> [!NOTE]
> If you would like to use asanAI (as it is), simply follow this link: [asanAI Toolkit](https://asanai.scads.ai)
# Run in docker
## Self-/local hosting
If you would like to host your own version, or if you would like to change the default values, add other examples, customize the theme, or do any other changes to the core of asanAI then follow the instructions below.
> [!TIP]
> Take a look at the [Introduction](https://asanai.scads.ai/cosmo_ok/index.php?&start_cosmo=1) and the [Exhibition](https://asanai.scads.ai/exhibition) version for some inspirations. These variations are currently in use in kiosk-mode at exhibitions and public events. Their code is also avaialble in this repository.
<details>
<summary>click here to expand the installation instructions...</summary>
## Debian
### Using Docker

`bash docker.sh --local-port 5312`
The installation script [docker.sh](https://github.com/NormanTUD/asanAI/blob/master/docker.sh) installs and configures all requirments.
We have tested this script on Debian, however it should work on most debian-based operating systems (such as Ubuntu).

## Other
#### On Debian
Clone this repository and execute the installation script as following:

```Shell
bash docker.sh --local-port 5312
```

```console
#### On Linux
(not tested but should work)
Clone this repository, then execute the following commands in a terminal one by one:

```Shell
LOCAL_PORT=5312
echo "LOCAL_PORT=$LOCAL_PORT" >> .env
sudo docker-compose build && sudo docker-compose up -d || echo "Failed to build container"
firefox localhost:$LOCAL_PORT/
```

# Status
#### On Windows
(not tested but should work)
Clone this repository, then execute the following commands in a terminal one by one:

```Shell
set LOCAL_PORT=5312
echo LOCAL_PORT=%LOCAL_PORT% >> .env
docker-compose build && docker-compose up -d || echo Failed to build container
start firefox localhost:%LOCAL_PORT%/
```

### Installation (no Docker)
For any reason you may decide to avoid using Docker and go for a navite installation.
This is also fairly straight forward.

#### Apache2 + PHP
Install Apache2 and PHP usign the package manager of your operating system.
They are required to assemble and serve the JS-files.

In the `php.ini`, increase the max file size as following:
```yaml
upload_max_filesize = 100M;
post_max_size = 100M;
```

#### MySQL (optional)
asanAI supports an optional login functionality which can be used for instance by teachers to instantly share contents in classrooms.
To enable this functionality a MySQL instance is requires.

> [!TIP]
> Run the following script for exporting python files on shared/remote hosts:
> ```console
> mkdir -p /var/www/tmp
> sudo chown -R www-user:$USER /var/www/tmp
> sudo chmod -R 775 /var/www/tmp
> ```
</details>
# Video tutorials (for users)
There is a series of [video tutorials](https://www.youtube.com/playlist?list=PLZkHu66nUK_6F59YAUZc6_sTzvGK3PCpk) about how to use asanAI available on our YouTube channel.
# Documentation (for developers)
A draft of the developers documentation is available [here](https://asanai.scads.ai/manual.html).
# Please note
asanAI is under active developement.
Although we do our best to keep this page up-to-date, some screenshots might differ from the active version.
The latest version from this repository is always accessible via [asanAI.ScaDS.AI](https://asanai.scads.ai).
If you encountered any problem using asanAI, please check [the issues](https://github.com/NormanTUD/asanAI/issues) and create a [new issue](https://github.com/NormanTUD/asanAI/issues/new/choose) if required.
The online version of asanAI employs an automatic monitoring mechanism which submits an anonymized log to the server in case of a failure.
This is an beta.
# Screenshots
<details>
<summary>Click here to see more screenshots from the software...</summary>
![Screenshot](screens/screen0.png "Visualization at the start page")
Expand All @@ -96,27 +198,14 @@ This is an beta.
![Screenshot](screens/screen3.png "Dark mode")
![Screenshot](screens/screen6.png "Maximally activated neurons")
</details>
# Installation

## Apache2 + PHP + MySQL

A MySQL instance is only needed for the login functionality. Apache and PHP serve the JS-files.
All calculations are done within the browser.

Run this for exporting python files, e.g. for taurus:

```console
mkdir -p /var/www/tmp
sudo chown -R www-user:$USER /var/www/tmp
sudo chmod -R 775 /var/www/tmp
```

# Standing on the shoulders of giants
I use many different libraries to achieve this. This is a list of all the modules that I used
in creating this program:
asanAI uses many different libraries under the hood.
<details>
<summary>Click here to expand the list...</summary>
[comment]: <> (BeginSources)
Expand Down Expand Up @@ -184,16 +273,9 @@ in creating this program:
- [Aurora Background Easter Egg](https://codepen.io/rawcreative/pen/kabgzJ)
[comment]: <> (EndSources)

# PHP Settings

In php.ini, set
- [comment]: <> (EndSources)
```
upload_max_filesize = 100M;
post_max_size = 100M;
```
</details>
# Sponsored by
Expand Down

0 comments on commit b71a636

Please sign in to comment.