Metadata-Version: 2.4
Name: deadlift
Version: 0.1.1
Summary: A personal ML model toolkit. Plug-and-play inference for various deep learning models.
Author-email: Rudra Khunti <rudrakhunti1@gmail.com>
License: Apache-2.0
Project-URL: Repository, https://github.com/Rudr4Khunt1/deadlift
Keywords: deep-learning,segmentation,crack-detection,inspection,nnunet
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: nnunetv2>=2.5
Requires-Dist: torch>=2.0
Requires-Dist: torchvision>=0.15
Requires-Dist: opencv-python>=4.8
Requires-Dist: numpy>=1.24
Requires-Dist: huggingface_hub>=0.20

# deadlift

A personal ML model toolkit. Plug-and-play inference for various deep learning models.

## Installation

```bash
pip install deadlift
```

Model weights are downloaded automatically from HuggingFace on first use.

## Crack Detection

```python
from deadlift.crack import CrackModel

model = CrackModel(device="auto")
result = model.predict("image.jpg")

# result["crack_mask"]   — binary mask (numpy array)
# result["crack_prob"]   — probability heatmap (numpy array)
# result["detections"]   — list of filtered detections with bboxes
# result["overlay"]      — annotated image with bounding boxes
```

### Configuration

```python
# Fast mode
model = CrackModel(device="mps", mirroring=False, tile_step=0.75)

# Max accuracy
model = CrackModel(device="cuda", mirroring=True, tile_step=0.5)

# Custom confidence threshold
result = model.predict("image.jpg", min_confidence=0.5, min_area=200)
```

### Save outputs

```python
import cv2

result = model.predict("image.jpg")
cv2.imwrite("overlay.png", result["overlay"])
cv2.imwrite("mask.png", result["crack_mask"])
```
