### Install Dependencies with uv Source: https://github.com/qbammey/synthbuster/blob/main/readme.md Installs project dependencies using Astral uv. Ensure the repository is cloned before running. ```bash uv sync ``` -------------------------------- ### Example Configuration for Training Source: https://github.com/qbammey/synthbuster/blob/main/readme.md A JSON configuration file for training Synthbuster models. Specifies dataset paths, model parameters, and training hyperparameters. ```json { "dataset_root": "/path/to/dataset", "file_extension": ".png", "method": "rank", "rank_sz": 4, "max_period": 16, "jpeg_mode": "none", "learning_rate": 0.05, "max_iter": 200, "max_depth": 3, "max_leaf_nodes": 31, "min_samples_leaf": 50, "l2_regularization": 1e-6, "random_state": 753 } ``` -------------------------------- ### Launch Streamlit Demo Source: https://github.com/qbammey/synthbuster/blob/main/readme.md Starts the interactive Streamlit demo for Synthbuster. Allows users to choose models, upload images, and see live predictions. ```bash uv run streamlit run streamlit_app.py ``` -------------------------------- ### Train a Model with Fixed Configuration Source: https://github.com/qbammey/synthbuster/blob/main/readme.md Trains a Synthbuster model using a specified configuration file. Saves the trained model and its configuration. ```bash uv run train_fixed.py \ --config config.json \ --save-model models/model.joblib \ --save-config models/config.json ``` -------------------------------- ### Inference on a Single Image Source: https://github.com/qbammey/synthbuster/blob/main/readme.md Runs a trained Synthbuster model on a single image to predict its probability of being synthetic and the class decision. ```bash uv run infer_image.py \ --model models/model.joblib \ --config models/config.json \ --image data/test/real/example.png ``` -------------------------------- ### Evaluate Model on a Dataset Split Source: https://github.com/qbammey/synthbuster/blob/main/readme.md Evaluates a trained Synthbuster model on a specified dataset split (train, val, test, or all). Results are saved to a JSON file. ```bash uv run evaluate_dataset.py \ --model models/model.joblib \ --config models/config.json \ --split test \ --n-jobs -1 \ --results results_test.json ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.