Command line¶
Everything is one command, ppe-guard, with subcommands. Run ppe-guard <command> --help for the same text.
usage: ppe-guard [-h] [--version]
{serve,password,predict,train,val,export,dataset,weights,doctor} ...
PPE compliance monitoring for construction sites.
positional arguments:
{serve,password,predict,train,val,export,dataset,weights,doctor}
serve run the web dashboard
password protect the dashboard with a password, or create an API token
predict check images, a folder, a video, a webcam or a stream
train fine-tune a YOLO model on the PPE dataset
val evaluate weights on the validation or test split
export export weights to ONNX, TensorRT, OpenVINO, CoreML, TFLite...
dataset dataset tools
weights list or download the trained PPE models
doctor check Python, GPU, models and dataset
options:
-h, --help show this help message and exit
--version show program's version number and exit
serve¶
usage: ppe-guard serve [-h] [--host HOST] [--port PORT] [--data-dir DATA_DIR]
[--models-dir MODELS_DIR] [--no-autostart]
options:
-h, --help show this help message and exit
--host HOST
--port PORT
--data-dir DATA_DIR where settings, the database and snapshots live (default ./data)
--models-dir MODELS_DIR
where model weights are stored (default ./models)
--no-autostart don't start cameras marked autostart
password¶
usage: ppe-guard password [-h] [--data-dir DATA_DIR] [--stdin] {set,clear,token,status}
positional arguments:
{set,clear,token,status}
options:
-h, --help show this help message and exit
--data-dir DATA_DIR the server's data directory (default ./data)
--stdin read the new password from standard input
predict¶
usage: ppe-guard predict [-h] [--weights WEIGHTS] [--conf CONF] [--imgsz IMGSZ] [--device DEVICE]
[--require REQUIRE] [--delay DELAY] [--strict] [--show] [--save DIR]
[--fail-on-violation]
source
positional arguments:
source image, folder, video file, webcam index (0) or rtsp/http URL
options:
-h, --help show this help message and exit
--weights WEIGHTS
--conf CONF
--imgsz IMGSZ
--device DEVICE
--require REQUIRE comma list of helmet,vest,mask
--delay DELAY seconds before a video violation opens
--strict unseen required items count as missing
--show open a preview window
--save DIR write annotated images/video to DIR
--fail-on-violation exit with status 1 if any violation
train¶
usage: ppe-guard train [-h] [--model MODEL] [--data DATA] [--epochs EPOCHS] [--batch BATCH]
[--imgsz IMGSZ] [--patience PATIENCE] [--seed SEED] [--device DEVICE]
[--workers WORKERS] [--fraction FRACTION] [--project PROJECT] [--name NAME]
options:
-h, --help show this help message and exit
--model MODEL base weights, e.g. yolo26s.pt, yolo11s.pt, yolov8s.pt
--data DATA dataset yaml (default training/data.yaml)
--epochs EPOCHS
--batch BATCH
--imgsz IMGSZ
--patience PATIENCE
--seed SEED
--device DEVICE
--workers WORKERS
--fraction FRACTION share of training images to use (quick tests)
--project PROJECT
--name NAME
val¶
usage: ppe-guard val [-h] [--weights WEIGHTS] [--data DATA] [--split {val,test}] [--imgsz IMGSZ]
[--batch BATCH] [--device DEVICE]
options:
-h, --help show this help message and exit
--weights WEIGHTS
--data DATA
--split {val,test}
--imgsz IMGSZ
--batch BATCH
--device DEVICE
export¶
usage: ppe-guard export [-h] [--weights WEIGHTS] [--format FORMAT] [--imgsz IMGSZ] [--half]
options:
-h, --help show this help message and exit
--weights WEIGHTS
--format FORMAT
--imgsz IMGSZ
--half
dataset¶
usage: ppe-guard dataset [-h] {download} ...
positional arguments:
{download}
download download the Construction Site Safety dataset from Kaggle
options:
-h, --help show this help message and exit
dataset download¶
usage: ppe-guard dataset download [-h] [--dest DEST] [--force]
options:
-h, --help show this help message and exit
--dest DEST
--force
weights¶
usage: ppe-guard weights [-h] {list,download} [names ...]
positional arguments:
{list,download}
names
options:
-h, --help show this help message and exit