Skip to content

Ibouseye04/moonDreamPufferLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moondream × PufferLab RL — MVTec-AD (Transistor)

TL;DR

  • Do NOT clone/vendor the moondream-station repo into this project. Install it via pip and run it as a local service.
  • Default endpoint is http://localhost:2020/v1.
  • This repo talks to Station over HTTP using the official moondream Python client.

Project Layout

MoonDreamPufferlab/
 ├─ .venv/
 ├─ configs/
 │   └─ default.yaml
 ├─ envs/
 │   └─ transistor_env.py
 ├─ perception/
 │   └─ moondream_client.py
 ├─ scripts/
 │   ├─ prepare_mvtec.py
 │   └─ check_station.py
 ├─ data/                 # put MVTec-AD under here (see below)
 ├─ cache/
 ├─ train.py
 ├─ eval.py
 ├─ requirements.txt
 └─ Makefile

Setup

cd MoonDreamPufferlab
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

Run Moondream Station (local)

# In a separate terminal (with the same venv activated is fine)
moondream-station start 2020    # launches REST on http://localhost:2020/v1

# Optional: disable telemetry
moondream-station settings set logging false

# Check health
python scripts/check_station.py

You do not need to clone the Station repo. The PyPI package installs the CLI and models automatically. Only fork/clone if you plan to modify Station itself.

Data

Place/extract the MVTec-AD dataset so this exists:

data/mvtec_anomaly_detection/transistor/{train,test,ground_truth}/...

Or point dataset_root in configs/default.yaml to your dataset location.

Train (mock Moondream by default)

make train

Switch to real Moondream

Edit configs/default.yaml:

use_moondream: true
moondream_mode: "station"
moondream_url: "http://localhost:2020/v1"

Then run:

make train

Evaluate

make eval

Why not clone Station into this repo?

  • Clean separation: Station is a service; your code is a client.
  • Upgrades & security: managed via pip + version pins; easy to roll forward/back.
  • Only clone if you need to patch Station; then use a submodule or install from your fork (pip install git+https://...@commit).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published