Computer vision answers · Mining
How do I detect cracks in drill core samples with computer vision?
Without logging every fracture by hand, tray after tray.
Short answer
Train an instance segmentation model to outline each crack in your core tray photos with Roboflow for free, then count the cracks and measure their length in every tray. Give natural cracks and breaks made by drilling or handling their own classes, so only real fractures end up in your log. Photograph every tray from the same height with a scale bar in frame, so pixel lengths convert to centimeters the same way on every photo.
Skip the setup. Describe your images.
Describe your images and what you need to find. The agent sets up labeling, training and deployment with you.
Key facts
- What you need
- Core tray photos and a segmentation model trained on your cracks
- What you get
- Every crack outlined, with a count and length per tray
- Image sources
- Core tray photos from a core shed camera or phone
- Runs on
- Cloud API, or a core shed workstation running Docker

How to build drill core crack detection, step by step
Six steps from a photo of a core tray to every crack counted and measured.
Connect Roboflow to your coding agent, ChatGPT or Codex
Photograph core trays the same way every time
Outline every crack, with separate classes for natural cracks and drilling breaks
Train an instance segmentation model
Count and measure the cracks in each tray photo
Pythonimport supervision as sv from inference import get_model PIXELS_PER_CM = 12 # from the scale bar in your tray photos model = get_model("your-project/1") result = model.infer("tray_017.jpg", confidence=0.4)[0] detections = sv.Detections.from_inference(result) cracks = detections[detections.data["class_name"] == "crack"] lengths = (cracks.xyxy[:, 2:] - cracks.xyxy[:, :2]).max(axis=1) / PIXELS_PER_CM print(len(cracks), "cracks, lengths in cm:", lengths.round(1).tolist()) # 4 cracks, lengths in cm: [6.2, 3.1, 4.8, 1.9]Rather not write code? Ask the Roboflow agent to set this up for you
Run every tray and log the results per hole
Why 2 million engineers build on Roboflow
Label faster
Auto-label with SAM 3 or your own model, then fix the misses instead of drawing every box.
RF-DETR
Roboflow’s open-source real-time detection model, built for accuracy (opens in a new tab) on small objects.
Logic built in
Counting, zones, tracking and alerts are ready-made Workflow blocks, so there is less code to write.
Your model, your weights
Use your trained weights on every plan, including free, through the open-source Inference package.
Run it anywhere
Self-host on a workstation, Docker, an on-prem GPU or an edge device, or call the cloud API.