wut? --- What U Think? SatNOGS Observation AI. https://spacecruft.org/spacecruft/satnogs-wut
 
 
 
 
Go to file
root 16226ae82e Add systemd voila scripts 2022-05-30 00:26:26 -06:00
docs voila dark theme 2022-05-29 22:57:06 -06:00
notebooks Add systemd voila scripts 2022-05-30 00:26:26 -06:00
pics spacecruft svg 2020-01-22 21:24:44 -07:00
scripts uh, voila on wut, jupyter on ml0 duh 2020-01-21 19:08:09 -07:00
.gitignore ignore tmp model render 2022-05-29 20:24:07 -06:00
LICENSE-CC license 2020-01-02 16:55:08 -07:00
LICENSE-GPL license 2020-01-02 16:55:08 -07:00
README.md Update notebooks to current Keras, pip deps 2022-05-29 16:06:43 -06:00
requirements-node.txt CPU nodes for tensorflow 2022-05-29 20:24:34 -06:00
requirements-voila.txt Update notebooks to current Keras, pip deps 2022-05-29 16:06:43 -06:00
requirements.txt Update notebooks to current Keras, pip deps 2022-05-29 16:06:43 -06:00
wut update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-audio-archive update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-audio-sha1 wut-ogg2wav, misc 2020-01-06 15:35:22 -07:00
wut-compare wut-compare scripts 2020-01-02 20:41:56 -07:00
wut-compare-all Flip scoring, rename variables 2020-01-02 20:56:16 -07:00
wut-compare-tx wut-ml-load wut-ml-save 2020-01-04 01:06:03 -07:00
wut-compare-txmode new output 2020-01-03 23:42:58 -07:00
wut-compare-txmode-csv update docs 2020-01-10 18:05:57 -07:00
wut-dl-sort update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-dl-sort-tx update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-dl-sort-txmode prep txmode waterfalls into respective subdirs 2020-01-28 18:17:41 -07:00
wut-dl-sort-txmode-all dec range 2020-02-21 11:04:01 -07:00
wut-files update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-files-data update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-files-data-all wut-files-data-all... 2020-02-21 11:32:02 -07:00
wut-img-ck.py check all PNGs 2022-05-29 21:29:28 -06:00
wut-ml update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-ml-auto update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-ml-load update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-ml-save update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-obs update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-ogg2wav update docs 2020-01-10 18:05:57 -07:00
wut-review-staging update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-rm-random update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-tf wtf scripts to check tensorflow setup 2020-01-20 12:26:00 -07:00
wut-tf.py wtf scripts to check tensorflow setup 2020-01-20 12:26:00 -07:00
wut-water update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-water-range update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-worker renames 2020-01-28 17:53:15 -07:00
wut-worker-mas cruft 2020-01-20 19:09:22 -07:00
wut-worker-mas.py update paths to /srv/satnogs 2020-01-26 17:27:12 -07:00
wut-worker.py renames 2020-01-28 17:53:15 -07:00

README.md

wut?

wut --- What U Think? SatNOGS Observation AI.

Website:

satnogs-wut

Image

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".

Good Observation

Image

Bad Observation

Image

Failed Observation

Image

wut Web

Source code:

Observations

See also:

Machine Learning

The system at present is built upon the following:

  • Debian Bookworm (testing/12).
  • Tensorflow.
  • Jupyter Lab.
  • Voila.

Learning/testing, results are good. The main AI/ML development is being done in Jupyter.

Jupyter

There Jupyter Lab Notebook files in the notebooks/ subdirectory. These are producing usable results. Voila is used to convert Jupyter notebooks into websites.

  • 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.
  • wut-web.ipynb
  • wut-web-beta.ipynb
  • wut-web-alpha.ipynb

wut scripts

The following scripts are in the repo.

  • wut --- Feed it an observation ID and it returns if it is a "good", "bad", or "failed" observation.
  • wut-audio-archive --- Downloads audio files from archive.org.
  • wut-audio-sha1 --- Verifies sha1 checksums of files downloaded from archive.org.
  • wut-compare --- Compare an observations' current presumably human vetting with a wut vetting.
  • wut-compare-all --- Compare all the observations in download/ with wut vettings.
  • wut-compare-tx --- Compare all the observations in download/ with wut vettings using selected transmitter UUID.
  • wut-compare-txmode --- Compare all the observations in download/ with wut vettings using selected encoding.
  • wut-compare-txmode-csv --- Compare all the observations in download/ with wut vettings using selected encoding, CSV output.
  • wut-dl-sort --- Populate data/ dir with waterfalls from download/.
  • wut-dl-sort-tx --- Populate data/ dir with waterfalls from download/ using selected transmitter UUID.
  • wut-dl-sort-txmode --- Populate data/ dir with waterfalls from download/ using selected encoding.
  • wut-dl-sort-txmode-all --- Populate data/ dir with waterfalls from download/ using all encodings.
  • wut-files --- Tells you about what files you have in downloads/ and data/.
  • wut-files-data --- Tells you about what files you have in data/.
  • wut-img-ck.py --- Validate image files are not corrupt with PIL.
  • wut-ml --- Main machine learning Python script using Tensorflow and Keras.
  • wut-ml-auto --- Machine learning Python script using Tensorflow and Keras, auto.
  • 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.
  • wut-obs --- Download the JSON for an observation ID.
  • wut-ogg2wav --- Convert .ogg files in downloads/ to .wav files.
  • wut-rm-random --- Randomly deletes stuff. Very bad.
  • wut-review-staging --- Review all images in data/staging.
  • wut-tf --- Shell script to set variables when launching wut-tf.py.
  • wut-tf.py --- Distributed learning script to be run on multiple nodes.
  • 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].
  • 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.

Installation

Installation notes...

There's more docs on a few different setups in the docs/ subdir.

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
mkdir -p data/val/good
mkdir -p data/val/bad
mkdir -p data/val/failed
mkdir -p data/staging
mkdir -p data/test/unvetted

Debian Packages

Install dependencies from Debian.

sudo apt update
sudo apt install curl jq python3-pip graphviz

Install Python Packages

For the machine learning scripts, like wut-ml, Tensorflow needs to be installed.

You need to add ~/.local/bin to your $PATH:

echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc

Then log out and back in, or reload ala:

. ~/.bashrc

Update pip to latest pretty version, in local directory. Vary Python package install, suited to taste.

pip install --user --upgrade pip

Make sure you have right pip:

debian@workstation:~$ which pip
/home/debian/.local/bin/pip

Install Python packages:

pip install --user --upgrade -r requirements.txt

Tensorflow KVM Notes

Note, for KVM, pass cpu=host if host has "avx" in /proc/cpuinfo.

Recent versions of Tensorflow can handle many more CPU build options to optimize for speed, such as AVX. 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 If you don't have this enabled, CPU instructions will fail or Tensorflow will run slower than it could.

Jupyter

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.

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:

  1. Download waterfalls and JSON descriptions with wut-water-range. These get put in the downloads/[ID]/ directories.

  2. Organize downloaded waterfalls into categories (e.g. "good", "bad", "failed"). Use wut-dl-sort script. The script will sort them into their respective directories under:

    • data/train/good/
    • data/train/bad/
    • data/train/failed/
    • data/val/good/
    • data/val/bad/
    • data/val/failed/
  3. Use machine learning script wut-ml to build a model based on the files in the data/train and data/val directories.

  4. Rate an observation using the wut script.

Data Caching Downloads

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 is requested, it is downloaded from the SatNOGS network to the download/ directory. That download/ directory is the download cache.

The data/ directory is just temporary files, mostly linked from the downloads/ directory. Files in the data/ directory are deleted by many scripts, so don't put anything you want to keep in there.

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.

Caveats

This is the first artificial intelligence script I've done, I know little about radio and less about satellites, and I'm not a programmer.

Source License / Copying

Main repository is available here:

License: CC By SA 4.0 International and/or GPLv3+ at your discretion. Other code licensed under their own respective licenses.

Copyright (C) 2019, 2020, 2022 Jeff Moe