Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

deadlift

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

Installation

pip install deadlift

Model weights are downloaded automatically from HuggingFace on first use.

Crack Detection

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

# 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

import cv2

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

About

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

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages