Prerequisites
- Python 3.11 or later
- uv package manager
- A directory of archaeological images (JPEG, PNG)
Run the pipeline
Clone and install
Clone the repository and install all dependencies with Verify the installation:
uv sync:Prepare your images
Place your archaeological images in a directory. The included sample dataset is a good starting point:Archeo-Cluster processes all
.jpg, .jpeg, and .png files in the input directory.Run the complete pipeline
Use the The
pipeline command to run all three stages — detection, clustering, and spatial analysis — in one step:--color flag specifies the target color for artifact detection in hex format. The default #A98876 works well for ceramic fragments.You should see output like:Review output files
Each session stores its results in a dedicated directory. The output includes:
| File | Description |
|---|---|
features.csv | Geometric features extracted from each detected object |
<image>/<image>_clustered.csv | Features with cluster assignments |
<image>/elbow_plot.png | K-selection elbow curve |
<image>/cluster_scatter.png | Cluster scatter plot |
<image>/ann_results.csv | Average Nearest Neighbor index per cluster |
<image>/ann_results.png | Spatial distribution map |
<image>/<image>.geojson | GeoJSON export for QGIS |
The results folder opens automatically when the pipeline completes. Use
--no-open to disable this behavior.Run stages individually
You can also run each stage of the pipeline separately for more control:Python API
You can also drive the analysis programmatically from Python:Next steps
CLI Reference
Explore all commands, flags, and default values.
Configuration
Customize detection, clustering, and paths with a config file.
Analysis Pipeline Guide
Deep dive into each stage of the pipeline.
Python API
Full API reference for programmatic usage.
