How alexmeredith8299/opssat-cloud-detection works
Project type and purpose
• This is an embedded image-processing experiment for a CubeSat (OPS-SAT).
• It integrates offline ML training (Python) with cross-compiled C/C++ algorithms to run on the satellite’s ARM-based processor.
File structure
• Top-level:
– CMakeLists.txt, Makefile, README.md, LICENSE
– src/ (main C++ algorithms)
– include/ (shared headers & constants)
– python/ (offline training & data-prep scripts)
– bin-arm/ & bin-sepp/ (cross-compile build pipelines & third-party libs)
– sandbox/, em_test/, release/ (testing outputs, deployment packaging)
• Patterns: layered build (third-party libs → core algorithms → packaging), clear separation of offline vs runtime code.
Extract README insights
• Four algorithms: luminosity threshold, random forest, U-Net, k-means.
• Build via CMake, deploy via shell scripts (e.g. random_forest.sh).
• Runs on ESA’s OPS-SAT with power/temperature telemetry.
Main components & their interactions
a. Development workstation
– Python environment
• lut_gen.py, tensorflow_dataloader.py, tf_train.ipynb → generate models or lookup tables.
– CMake build system
• Cross-compiler toolchain
• bin-arm/ (ARM pipeline) & bin-sepp/ (SEPP pipeline) drive downloads/builds of FP16, FXdiv, psimd, pthreadpool, abseil, eigen, xnnpack, flatbuffers, ruy, neon2sse, etc.
b. C++ Runtime modules
– src/main.cpp (luminosity, k-means, U-Net inference stub?)
– src/main_rf.cpp (random forest)
– Helper layer: include/constants.h, helper.h, stb_image*.h (I/O)
c. Deployment & execution
– Binaries (in bin-arm or release/)
– Shell scripts (random_forest.sh, start_exp185.sh, stop_exp185.sh)
– OPS-SAT Linux host (reads images → runs algorithms → logs outputs)
d. Data flow
– Input: raw satellite images (sandbox/io/… or camera feed)
– Processing: algorithm modules
– Output: masks, CSV logs, power/temperature metrics (em_test/, release/home/exp185/)
Architectural patterns & design principles
• Layered architecture:
– Third-party libraries (platform abstraction)
– Core image-processing algorithms (business logic)
– Deployment scripts and packaging (operational layer)
• Modular separation: Python‐only offline vs C++‐only onboard code.
• Cross-compile build pipeline isolates target‐specific dependencies.
• Clear boundaries: I/O → Processing → Reporting.
Detail level
– Show that the Python environment writes to a shared “models/” folder.
– Include the platform abstraction libraries (FP16, FXdiv, psimd, pthreadpool, xnnpack).
– Indicate configuration files (confu.yaml, config.dev.ini) feeding into the build/deploy scripts.
Conclusion