2020-01-16 15:29:06 -07:00
|
|
|
# wut?
|
|
|
|
`wut` --- What U Think? SatNOGS Observation AI.
|
|
|
|
|
2020-01-21 20:54:57 -07:00
|
|
|
|
|
|
|
Website:
|
|
|
|
* https://wut.spacecruft.org
|
|
|
|
|
|
|
|
|
2020-01-01 23:12:46 -07:00
|
|
|
# satnogs-wut
|
2021-07-14 19:34:52 -06:00
|
|
|
![Image](pics/wut-web.png)
|
|
|
|
|
2020-01-02 16:44:03 -07:00
|
|
|
The goal of satnogs-wut is to have a script that will take an
|
|
|
|
observation ID and return an answer whether the observation is
|
|
|
|
"good", "bad", or "failed".
|
|
|
|
|
2020-01-02 16:52:23 -07:00
|
|
|
## Good Observation
|
2021-07-14 19:37:11 -06:00
|
|
|
![Image](pics/waterfall-good.png)
|
2020-01-02 16:52:23 -07:00
|
|
|
|
|
|
|
## Bad Observation
|
2021-07-14 19:37:11 -06:00
|
|
|
![Image](pics/waterfall-bad.png)
|
2020-01-02 16:52:23 -07:00
|
|
|
|
|
|
|
## Failed Observation
|
2021-07-14 19:36:29 -06:00
|
|
|
![Image](pics/waterfall-failed.png)
|
2020-01-02 16:51:29 -07:00
|
|
|
|
2020-02-13 13:29:26 -07:00
|
|
|
## wut Web
|
2022-05-30 00:47:12 -06:00
|
|
|
Main site:
|
|
|
|
* https://wut.spacecruft.org/
|
2020-02-13 13:29:26 -07:00
|
|
|
|
|
|
|
Source code:
|
|
|
|
* https://spacecruft.org/spacecruft/satnogs-wut
|
|
|
|
|
2022-05-30 00:47:12 -06:00
|
|
|
Beta (test) site:
|
|
|
|
|
|
|
|
* https://wut-beta.spacecruft.org/
|
|
|
|
|
|
|
|
Alpha (development) site:
|
|
|
|
|
|
|
|
* https://wut-alpha.spacecruft.org/
|
|
|
|
|
2020-01-16 19:07:43 -07:00
|
|
|
## Observations
|
|
|
|
See also:
|
|
|
|
|
|
|
|
* https://wiki.satnogs.org/Operation
|
2020-02-13 13:29:26 -07:00
|
|
|
* https://wiki.satnogs.org/Observe
|
|
|
|
* https://wiki.satnogs.org/Observations
|
|
|
|
* https://wiki.satnogs.org/Category:RF_Modes
|
2020-01-16 19:31:07 -07:00
|
|
|
* Sample observation: https://network.satnogs.org/observations/1456893/
|
2020-01-16 19:07:43 -07:00
|
|
|
|
2020-01-02 16:44:03 -07:00
|
|
|
# Machine Learning
|
2020-01-02 22:10:19 -07:00
|
|
|
The system at present is built upon the following:
|
2020-01-02 16:44:03 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
* Debian Bookworm (testing/12).
|
|
|
|
* Tensorflow.
|
2020-01-16 18:36:00 -07:00
|
|
|
* Jupyter Lab.
|
2020-02-13 13:29:26 -07:00
|
|
|
* Voila.
|
2020-01-01 23:18:12 -07:00
|
|
|
|
2020-02-13 13:29:26 -07:00
|
|
|
Learning/testing, results are good.
|
|
|
|
The main AI/ML development is being done in Jupyter.
|
2020-01-01 23:18:12 -07:00
|
|
|
|
2020-01-16 16:03:19 -07:00
|
|
|
# Jupyter
|
2020-02-13 13:29:26 -07:00
|
|
|
There Jupyter Lab Notebook files in the `notebooks/` subdirectory.
|
2020-02-13 13:37:18 -07:00
|
|
|
These are producing usable results. Voila is used to convert
|
|
|
|
Jupyter notebooks into websites.
|
2020-01-01 23:18:12 -07:00
|
|
|
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut.ipynb` --- Machine learning Python script using Tensorflow and Keras in a Jupyter Notebook.
|
|
|
|
* `wut-predict.ipynb` --- Make prediction (rating) of observation from pre-existing model.
|
|
|
|
* `wut-train.ipynb` --- Train models to be using by prediction engine.
|
2022-05-30 00:47:12 -06:00
|
|
|
* `wut-web.ipynb` --- Website: https://wut.spacecruft.org/
|
|
|
|
* `wut-web-beta.ipynb` --- Website: https://wut-beta.spacecruft.org/
|
|
|
|
* `wut-web-alpha.ipynb` --- Website: https://wut-alpha.spacecruft.org/
|
|
|
|
|
2020-01-01 23:18:12 -07:00
|
|
|
|
2020-01-16 15:29:06 -07:00
|
|
|
# wut scripts
|
2020-02-13 13:29:26 -07:00
|
|
|
The following scripts are in the repo.
|
2020-01-02 16:44:03 -07:00
|
|
|
|
|
|
|
* `wut` --- Feed it an observation ID and it returns if it is a "good", "bad", or "failed" observation.
|
2022-06-11 16:05:38 -06:00
|
|
|
* `wut-aria-add` --- Add a torrent from the Internet Archive to the aria daemon for downloading.
|
|
|
|
* `wut-aria-daemon` --- Run an aria daemon for torrent downloads from the Internet Archive.
|
2020-01-10 18:05:57 -07:00
|
|
|
* `wut-audio-archive` --- Downloads audio files from archive.org.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-audio-sha1` --- Verifies sha1 checksums of files downloaded from archive.org.
|
2020-01-02 22:10:19 -07:00
|
|
|
* `wut-compare` --- Compare an observations' current presumably human vetting with a `wut` vetting.
|
2020-01-02 20:41:56 -07:00
|
|
|
* `wut-compare-all` --- Compare all the observations in `download/` with `wut` vettings.
|
2020-01-03 15:23:12 -07:00
|
|
|
* `wut-compare-tx` --- Compare all the observations in `download/` with `wut` vettings using selected transmitter UUID.
|
2020-01-03 14:48:41 -07:00
|
|
|
* `wut-compare-txmode` --- Compare all the observations in `download/` with `wut` vettings using selected encoding.
|
2020-01-10 18:05:57 -07:00
|
|
|
* `wut-compare-txmode-csv` --- Compare all the observations in `download/` with `wut` vettings using selected encoding, CSV output.
|
2020-01-02 20:14:36 -07:00
|
|
|
* `wut-dl-sort` --- Populate `data/` dir with waterfalls from `download/`.
|
2020-01-03 15:23:12 -07:00
|
|
|
* `wut-dl-sort-tx` --- Populate `data/` dir with waterfalls from `download/` using selected transmitter UUID.
|
2020-01-03 14:34:22 -07:00
|
|
|
* `wut-dl-sort-txmode` --- Populate `data/` dir with waterfalls from `download/` using selected encoding.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-dl-sort-txmode-all` --- Populate `data/` dir with waterfalls from `download/` using all encodings.
|
2020-01-10 18:05:57 -07:00
|
|
|
* `wut-files` --- Tells you about what files you have in `downloads/` and `data/`.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-files-data` --- Tells you about what files you have in `data/`.
|
2022-06-10 19:41:20 -06:00
|
|
|
* `wut-ia` --- Download SatNOGS data from the Internet Archive at `archive.org`.
|
2022-06-10 21:17:08 -06:00
|
|
|
* `wut-ia-torrents` --- Download SatNOGS torrents from the Internet Archive at `archive.org`.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-img-ck.py` --- Validate image files are not corrupt with PIL.
|
2020-01-02 20:14:36 -07:00
|
|
|
* `wut-ml` --- Main machine learning Python script using Tensorflow and Keras.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-ml-auto` --- Machine learning Python script using Tensorflow and Keras, auto.
|
2020-01-10 18:05:57 -07:00
|
|
|
* `wut-ml-load` --- Machine learning Python script using Tensorflow and Keras, load `data/wut.h5`.
|
|
|
|
* `wut-ml-save` --- Machine learning Python script using Tensorflow and Keras, save `data/wut.h5`.
|
2020-01-02 19:13:58 -07:00
|
|
|
* `wut-obs` --- Download the JSON for an observation ID.
|
2020-01-10 18:05:57 -07:00
|
|
|
* `wut-ogg2wav` --- Convert `.ogg` files in `downloads/` to `.wav` files.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-rm-random` --- Randomly deletes stuff. Very bad.
|
2020-01-02 20:14:36 -07:00
|
|
|
* `wut-review-staging` --- Review all images in `data/staging`.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-tf` --- Shell script to set variables when launching `wut-tf.py`.
|
|
|
|
* `wut-tf.py` --- Distributed learning script to be run on multiple nodes.
|
2020-01-02 19:13:58 -07:00
|
|
|
* `wut-water` --- Download waterfall for an observation ID to `download/[ID]`.
|
|
|
|
* `wut-water-range` --- Download waterfalls for a range of observation IDs to `download/[ID]`.
|
2020-02-13 13:29:26 -07:00
|
|
|
* `wut-worker` --- Shell script to set variables when launching `wut-worker.py`.
|
|
|
|
* `wut-worker.py` --- Distributed training script to run on multiple nodes.
|
|
|
|
* `wut-worker-mas` --- Shell script to set variables when launching `wut-worker-mas.py`.
|
|
|
|
* `wut-worker-mas.py` --- Distributed training script to run on multiple nodes, alt version.
|
2020-01-02 16:44:03 -07:00
|
|
|
|
|
|
|
|
2020-01-02 17:30:22 -07:00
|
|
|
# Installation
|
2020-02-13 13:29:26 -07:00
|
|
|
Installation notes...
|
2020-01-02 17:30:22 -07:00
|
|
|
|
2020-02-13 13:37:18 -07:00
|
|
|
There's more docs on a few different setups in the `docs/` subdir.
|
|
|
|
|
2020-01-02 17:30:22 -07:00
|
|
|
## Setup
|
|
|
|
The scripts use files that are ignored in the git repo.
|
|
|
|
So you need to create those directories:
|
|
|
|
|
|
|
|
```
|
|
|
|
mkdir -p download
|
|
|
|
mkdir -p data/train/good
|
|
|
|
mkdir -p data/train/bad
|
|
|
|
mkdir -p data/train/failed
|
2020-01-02 19:28:26 -07:00
|
|
|
mkdir -p data/val/good
|
|
|
|
mkdir -p data/val/bad
|
|
|
|
mkdir -p data/val/failed
|
2020-01-02 17:30:22 -07:00
|
|
|
mkdir -p data/staging
|
|
|
|
mkdir -p data/test/unvetted
|
|
|
|
```
|
|
|
|
|
|
|
|
## Debian Packages
|
2022-05-28 13:43:37 -06:00
|
|
|
Install dependencies from Debian.
|
2020-01-02 17:30:22 -07:00
|
|
|
|
|
|
|
```
|
2022-05-28 13:46:32 -06:00
|
|
|
sudo apt update
|
2022-05-29 16:06:43 -06:00
|
|
|
sudo apt install curl jq python3-pip graphviz
|
2020-01-02 17:30:22 -07:00
|
|
|
```
|
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
## Install Python Packages
|
2020-01-15 17:06:04 -07:00
|
|
|
For the machine learning scripts, like `wut-ml`, Tensorflow
|
|
|
|
needs to be installed.
|
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
You need to add `~/.local/bin` to your `$PATH`:
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
```
|
|
|
|
echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc
|
|
|
|
```
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
Then log out and back in, or reload ala:
|
|
|
|
```
|
|
|
|
. ~/.bashrc
|
|
|
|
```
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
Update pip to latest pretty version, in local directory.
|
|
|
|
Vary Python package install, suited to taste.
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
```
|
|
|
|
pip install --user --upgrade pip
|
|
|
|
```
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
Make sure you have right pip:
|
|
|
|
```
|
|
|
|
debian@workstation:~$ which pip
|
|
|
|
/home/debian/.local/bin/pip
|
|
|
|
```
|
2020-01-15 17:06:04 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
Install Python packages:
|
2020-01-02 17:30:22 -07:00
|
|
|
```
|
2022-05-28 13:43:37 -06:00
|
|
|
pip install --user --upgrade -r requirements.txt
|
2020-01-02 17:30:22 -07:00
|
|
|
```
|
|
|
|
|
2022-08-16 19:26:40 -06:00
|
|
|
Make and install `satnogs-wut`:
|
|
|
|
|
|
|
|
```
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
2020-01-16 16:00:25 -07:00
|
|
|
### Tensorflow KVM Notes
|
2022-05-28 13:43:37 -06:00
|
|
|
Note, for KVM, pass cpu=host if host has "avx" in `/proc/cpuinfo`.
|
|
|
|
|
2020-01-16 16:00:25 -07:00
|
|
|
Recent versions of Tensorflow can handle many more CPU build options
|
|
|
|
to optimize for speed, such as
|
|
|
|
[AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions).
|
|
|
|
By default, Proxmox and likely other virtual machine systems pass
|
|
|
|
kvm/qemu "type=kvm" for CPU type. To use all possible CPU options
|
|
|
|
available on the bare metal server, use "type=host".
|
|
|
|
For more info about this in Proxmox, see
|
|
|
|
[CPU Type](https://pve.proxmox.com/pve-docs/chapter-qm.html#qm_cpu)
|
|
|
|
If you don't have this enabled, CPU instructions will fail or
|
|
|
|
Tensorflow will run slower than it could.
|
|
|
|
|
2020-01-15 21:50:07 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
## Jupyter
|
2020-01-15 17:11:43 -07:00
|
|
|
Jupyter is a cute little web interface that makes Python programming
|
|
|
|
easy. It works well for machine learning because you can step through
|
|
|
|
just parts of the code, changing variables and immediately seeing
|
|
|
|
output in the web browser.
|
|
|
|
|
|
|
|
|
2020-01-02 17:11:16 -07:00
|
|
|
# Usage
|
|
|
|
The main purpose of the script is to evaluate an observation,
|
|
|
|
but to do that, it needs to build a corpus of observations to
|
|
|
|
learn from. So many of the scripts in this repo are just for
|
|
|
|
downloading and managing observations.
|
|
|
|
|
|
|
|
|
|
|
|
The following steps need to be performed:
|
|
|
|
|
2020-01-02 22:10:19 -07:00
|
|
|
1. Download waterfalls and JSON descriptions with `wut-water-range`.
|
2020-01-02 17:11:16 -07:00
|
|
|
These get put in the `downloads/[ID]/` directories.
|
|
|
|
|
|
|
|
1. Organize downloaded waterfalls into categories (e.g. "good", "bad", "failed").
|
2020-01-02 20:14:36 -07:00
|
|
|
Use `wut-dl-sort` script.
|
2020-01-03 13:58:35 -07:00
|
|
|
The script will sort them into their respective directories under:
|
2020-01-02 17:16:11 -07:00
|
|
|
* `data/train/good/`
|
|
|
|
* `data/train/bad/`
|
|
|
|
* `data/train/failed/`
|
2020-01-02 19:28:26 -07:00
|
|
|
* `data/val/good/`
|
|
|
|
* `data/val/bad/`
|
|
|
|
* `data/val/failed/`
|
2020-01-02 17:11:16 -07:00
|
|
|
|
|
|
|
1. Use machine learning script `wut-ml` to build a model based on
|
2020-01-02 19:28:26 -07:00
|
|
|
the files in the `data/train` and `data/val` directories.
|
2020-01-02 17:11:16 -07:00
|
|
|
|
|
|
|
1. Rate an observation using the `wut` script.
|
|
|
|
|
2020-01-03 19:03:43 -07:00
|
|
|
## Data Caching Downloads
|
2020-01-02 22:51:51 -07:00
|
|
|
The scripts are designed to not download a waterfall or make a JSON request
|
|
|
|
for an observation it has already requested. The first time an observation
|
2020-01-10 18:05:57 -07:00
|
|
|
is requested, it is downloaded from the SatNOGS network to the `download/`
|
|
|
|
directory. That `download/` directory is the download cache.
|
2020-01-02 22:51:51 -07:00
|
|
|
|
|
|
|
|
2020-01-10 18:05:57 -07:00
|
|
|
The `data/` directory is just temporary files, mostly linked from the
|
|
|
|
`downloads/` directory. Files in the `data/` directory are deleted by many
|
2020-01-02 22:51:51 -07:00
|
|
|
scripts, so don't put anything you want to keep in there.
|
2020-01-02 17:11:16 -07:00
|
|
|
|
2020-01-03 13:37:48 -07:00
|
|
|
|
2020-01-10 18:05:57 -07:00
|
|
|
## Preprocessed Files
|
|
|
|
Files in the `preprocess/` directory have been preprocessed to be used
|
|
|
|
further in the pipeline. This contains `.wav` files that have been
|
|
|
|
decoded from `.ogg` files.
|
|
|
|
|
2022-06-10 19:41:20 -06:00
|
|
|
## Internet Archive Downloads
|
|
|
|
The Internet Archive has a mirror of data from the SatNOGS network.
|
|
|
|
It is better to download from there to save on Libre Space Foundation
|
|
|
|
resources.
|
|
|
|
|
|
|
|
* https://archive.org/details/satnogs
|
|
|
|
|
|
|
|
To download, perhaps do something like the following.
|
|
|
|
Get an account at archive.org, then run this to set up your account locally:
|
|
|
|
|
|
|
|
```
|
|
|
|
ia configure
|
|
|
|
```
|
|
|
|
|
2022-06-10 21:17:08 -06:00
|
|
|
To download all the SatNOGS collections `.torrent` files from the
|
|
|
|
Internet Archive, run:
|
|
|
|
|
|
|
|
```
|
|
|
|
wut-ia-torrents
|
|
|
|
```
|
|
|
|
|
2020-01-10 18:05:57 -07:00
|
|
|
|
2020-01-02 17:11:16 -07:00
|
|
|
# Caveats
|
2020-02-13 13:29:26 -07:00
|
|
|
This is the first artificial intelligence script I've done,
|
2020-01-03 14:34:22 -07:00
|
|
|
I know little about radio and less about satellites,
|
2020-01-02 17:11:16 -07:00
|
|
|
and I'm not a programmer.
|
|
|
|
|
|
|
|
|
2020-01-02 16:44:03 -07:00
|
|
|
# Source License / Copying
|
2020-01-02 16:56:30 -07:00
|
|
|
Main repository is available here:
|
2020-01-02 17:11:16 -07:00
|
|
|
|
2020-01-02 16:56:30 -07:00
|
|
|
* https://spacecruft.org/spacecruft/satnogs-wut
|
|
|
|
|
|
|
|
|
2020-01-02 16:55:08 -07:00
|
|
|
License: CC By SA 4.0 International and/or GPLv3+ at your discretion. Other code licensed under their own respective licenses.
|
2020-01-01 23:18:12 -07:00
|
|
|
|
2022-05-28 13:43:37 -06:00
|
|
|
Copyright (C) 2019, 2020, 2022 Jeff Moe
|