Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › annotation

How to Prepare and Label Crack Images for Deep Learning Segmentation

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reliable crack segmentation starts before model training: define whether the network should mark crack pixels or separate crack instances, write an annotation policy, preserve exact image–mask geometry, and split related images so near-duplicates cannot cross partitions. The dataset must also resemble the surfaces, lighting, viewpoints and crack widths expected after deployment.

This guide gives a complete, tool-agnostic workflow for collecting, labeling, validating, preprocessing and partitioning crack imagery. It explains why binary masks may contain either 0/255 or 0/1 values, how to crop large images without breaking labels, and how to detect leakage and annotation errors before they become misleading validation scores.

As an Amazon Associate I earn from qualifying purchases.

1. Decide what the model must predict

“Crack segmentation” can mean two different outputs. Choose one before drawing the first label because the annotation format, mask loader and evaluation metrics depend on it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Semantic segmentation: crack versus background

Semantic segmentation assigns a class to every pixel. A binary mask normally has one foreground class, crack, and one background class. If several cracks touch, they remain the same foreground class; the model is not required to identify which pixels belong to which physical crack.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Instance segmentation: each crack as an object

Instance segmentation separates individual crack objects, even when they share the same class name. Polygon or contour annotations are common. The documented Ultralytics Crack Segmentation Dataset, for example, uses one crack class with polygon labels. This format is useful when downstream software needs separate objects, counts or per-crack measurements, but it requires a consistent rule for touching branches and intersections.

Decision Semantic output Instance output
Prediction One class value for every pixel A separate mask or polygon for each object
Typical annotation Binary raster mask Polygons, contours or instance masks
Touching cracks Usually one connected foreground region Annotator must decide whether they are one object or multiple objects
Best fit Area, coverage, continuity and pixel-level damage maps Object counts, per-crack measurements and tracking
Labeling effort Usually lower, but boundaries still need care Higher because object identity and separation must be recorded

Write the annotation policy first

Create a short policy that every annotator can follow without guessing. Define how to label:

  • Branches, intersections and cracks that merge into a network.
  • Cracks partly hidden by dirt, debris, paint, vegetation or another object.
  • Shadows, expansion joints, mortar lines, scratches and seams that resemble cracks.
  • Very faint or hairline structures and boundaries that are wider than the visible centerline.
  • Cracks reaching the image edge.
  • Uncertain regions: label them as crack, background or an explicit ignore class.

The cited datasets do not establish one universal answer for these edge cases. Your policy is part of the dataset specification; version it when the project changes and record which label version produced each mask.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Specify the mask and file contract

A mask is useful only when the training loader can interpret it exactly. Put the encoding in a human-readable README and in machine-readable metadata where possible.

Binary values are conventions, not universal standards

One published masonry dataset uses white crack pixels with value 255 and black background pixels with value 0. The Indian Footpath Damage Segmentation dataset describes binary PNG masks with damaged pixels valued at 1 and background at 0. Both are valid; silently mixing them can turn every foreground pixel into background or vice versa.

Item Example specification What to document
Classes 0 = background, 1 = crack Class names, numeric IDs and whether an ignore value exists
Pixel encoding 0/1 or 0/255 Exact values, bit depth and loader conversion
File format JPEG image plus PNG mask Extensions, color mode and alpha-channel handling
Pairing road_014.jpg with road_014_mask.png Naming rule and the behavior when a pair is missing
Geometry Same width, height and orientation Coordinate origin, rotation metadata and permitted transforms

Never infer class meaning from appearance alone. A mask displayed as black and white may contain 0/1 values, 0/255 values or palette indices. Inspect unique pixel values with an image tool or a small validation script and normalize them deliberately in the loader.

3. Collect images that represent deployment

Segmentation quality depends on the visual conditions the model will encounter, not just on the number of files. Assemble examples across the expected surface types, camera distances, viewpoints and lighting conditions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Capture the difficult variations

  • Crack widths from hairline to wide openings.
  • Low contrast, bright or pale cracks and cracks filled with debris.
  • Rough, scaled, porous or highly textured materials.
  • Shadows, glare, wet surfaces, holes, edges and occlusions.
  • Different cameras, focal lengths, heights and viewing angles used in operation.
  • Negative images containing joints, scratches, stains and texture without cracks.

A repository describing manually annotated crack imagery lists thin, medium and thick cracks, debris-filled and lighter cracks, shadows and high texture diversity. SDNET2018 reports more than 56,000 images and crack widths from 0.06 mm to 25 mm, with obstructions including shadows, roughness, scaling, edges, holes and debris. Those figures describe those datasets, not a required collection size or a guarantee of performance.

Record provenance and conditions

For every image, retain source, surface or structure type, location or route when appropriate, capture session, camera setup, lighting and environmental condition. This metadata lets you create a realistic held-out test set and investigate failures. It also identifies related frames that must be grouped during splitting.

Understand published dataset sizes correctly

Dataset or documentation Reported images and split Interpretation
Ultralytics Crack Segmentation Dataset documentation 4,029 annotated images: 3,717 train, 200 validation and 112 test A documented instance-polygon example, not a recommended sample count
Indian Footpath Damage Segmentation, Scientific Data (2025) 583 images: 411 train, 85 validation and 87 test; a 70:15:15 partition is described A particular manually labeled binary-mask dataset
SDNET2018 (2018) More than 56,000 images; reported crack widths 0.06–25 mm Large source collection with specific acquisition conditions and obstructions

Use these numbers to understand the range of existing examples, not as a formula for your own project. The right quantity depends on visual diversity, label consistency and the deployment distribution.

4. Build exact image–mask pairs

Keep a one-to-one relationship between each source image and its intended label. A robust manifest should include an image path, mask path, split, source or scene identifier, dimensions, class list, mask encoding and annotation version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Choose a stable identifier. Use an identifier that does not change when files are moved. A suffix such as _mask is a documented convention, but any unambiguous rule is acceptable.
  2. Verify existence. Check that every image has exactly one intended mask and that every mask points to an image. Put unresolved files in a review queue rather than silently dropping them.
  3. Compare dimensions and orientation. Width, height and orientation metadata must agree. A rotated image with an unrotated mask is a label error even when both files open normally.
  4. Inspect overlays. Render the mask with transparency over the image. Look for a consistent pixel shift, flipped axes, wrong crop, truncated edges and labels drawn on the wrong scene.
  5. Preserve the original. Keep raw images immutable and store derived crops, normalized masks and augmented files in separate directories with a recorded parent ID.

Cropping large images into patches

Cropping can make very high-resolution imagery practical for deep-learning models. Apply identical crop coordinates to the image and mask, and retain the parent-image and crop-window identifiers. If a crack crosses a tile boundary, use overlapping tiles or a boundary policy so the model does not see systematically truncated structures. Never place neighboring patches from the same original scene in different partitions; they can reveal the scene through texture and geometry.

5. Annotate in controlled passes

Run a pilot before labeling everything

Label a small, diverse pilot containing clear cracks, ambiguous boundaries, difficult textures and negative images. Have a second annotator or reviewer examine it. Use disagreements to refine the policy before production labeling. The cited sources identify manual labeling and annotation noise as important concerns but do not provide a universal agreement threshold or labeling-time estimate.

Use a suitable annotation representation

LabelMe is reported as the annotation tool for the Indian Footpath Damage Segmentation dataset, which then stores paired JPG images and PNG masks. For semantic segmentation, export a raster mask at the source resolution or at a documented, lossless intermediate resolution. For instance segmentation, export polygons or instance masks with stable class IDs and object boundaries.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Handle ambiguous boundaries consistently

Decide whether the label follows the visible outer edge, the dark center, or an estimated physical opening. Apply that rule to all surfaces. If uncertainty cannot be resolved, use a documented ignore value or flag the region for adjudication rather than allowing each annotator to make a different choice.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. Split the data without leakage

Create train, validation and test partitions before tuning preprocessing, augmentation or model settings. Keep the test set untouched until final evaluation.

Group related observations

Randomly assigning individual frames is unsafe for videos, road surveys, repeated camera passes or tiled photographs. Group by original scene, road or site, capture session and parent image. All patches and near-neighbor frames from one group belong to one partition.

Deduplicate and stratify

Search for exact duplicates and near-duplicates before splitting. OpenCrack describes deduplication across splits and stratification by source, crack presence and width band. Apply the same ideas to your collection so one source, one width range or one easy surface does not dominate a partition.

Partition Purpose Rules
Training Fit model parameters May contain augmentation and repeated optimization; never include test images or their near-duplicates
Validation Select preprocessing, thresholds and model settings Group related scenes; inspect performance by surface and crack-width band
Test Estimate final generalization Freeze until decisions are complete; represent deployment conditions and remain isolated by source

When deployment differs sharply from close-up training imagery, consider an explicitly separated test subset with the wider geometry or road-inspection conditions expected in use. Report its composition rather than combining it invisibly with an easier in-domain score.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

7. Preprocess without erasing narrow cracks

There is no universally correct resize, enhancement or input resolution. The sources include an example training size of 640 pixels and datasets with varied source resolutions, but they do not establish one recipe that preserves every crack type.

Choose resolution from the smallest target

Estimate how many input pixels represent the narrowest crack that matters operationally. Aggressive downscaling can remove a one- or two-pixel structure or turn it into an inconsistent gray line. Compare candidate sizes by overlaying the resized mask and checking whether positive regions remain connected and measurable.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Apply geometric transforms to both files

Horizontal or vertical flips, rotations, crops and perspective changes must use identical parameters for image and mask. A transform applied only to the image creates a plausible-looking but false training example.

Use categorical interpolation for masks

Resize masks with nearest-neighbor interpolation or an equivalent categorical method. Bilinear or bicubic interpolation creates intermediate class values along boundaries; those values are not crack classes unless your loader explicitly handles them. Resize the image with the interpolation appropriate for its format, then validate the resulting mask’s unique values.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep photometric changes realistic

Brightness, contrast, color and noise changes belong to the image only, but they should resemble conditions in deployment. Enhancement that makes every crack artificially obvious can produce a model that fails on ordinary illumination. Test preprocessing on held-out images and inspect overlays, not just training loss.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Quality-control checks before training

Automate deterministic checks and reserve human review for visual ambiguity.

  • Pair completeness: no missing, duplicate or orphaned image–mask paths.
  • Shape and orientation: dimensions and coordinate orientation match.
  • Mask values: only documented class IDs and ignore values occur.
  • Foreground statistics: flag empty masks, implausibly large coverage and extreme class imbalance for review.
  • Overlay alignment: sample every source, session and surface type; inspect thin boundaries at native resolution.
  • File loading: open every image and mask with the same code path used by training.
  • Split isolation: verify no parent scene, duplicate hash or near-duplicate appears in more than one partition.
  • Annotation consistency: compare a double-labeled pilot or adjudicated subset and record policy changes.

Keep an audit log with the reviewer, date, annotation version, corrected files and reason for each change. Regenerate derived masks and manifests from that record when the policy changes.

9. Match evaluation to the labels

Evaluate on a held-out set that was not used to choose preprocessing or thresholds. For pixel segmentation, report metrics that reflect overlap and error types. The Scientific Data paper reports Dice, IoU, accuracy, precision, recall and F1. Accuracy alone can look high when most pixels are background, so pair it with overlap and foreground-sensitive measures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

OpenCrack notes that annotation granularity differs across source datasets. Do not compare a pixel-mask score with a polygon or image-level score as though they measured the same task. State whether evaluation uses the full image, a pixel-mask subset, an ignore region and which class encoding was converted before scoring.

10. Common failures and their fixes

The model predicts background everywhere

Check that crack pixels use the class ID expected by the loader, especially when converting 0/255 masks to 0/1. Inspect foreground-pixel counts and a batch of rendered labels before changing the model.

Predictions are shifted from the visible crack

Compare an overlay of the original image and mask, then inspect crop coordinates, EXIF orientation handling and any resize or padding operation. Rebuild affected pairs from immutable originals.

Validation is excellent but field performance is poor

Look for same-scene leakage, repeated video frames, tiled neighbors or a validation set that lacks the deployment surface. Re-split by group and add a separately identified deployment-domain test set.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Thin cracks disappear after preprocessing

Measure the narrowest target after each resize, avoid excessive downscaling, use overlap for tiles and confirm nearest-neighbor mask resizing. If the crack is below the sensor’s reliable resolution, record that limitation instead of creating artificial labels.

Texture and joints trigger false positives

Add hard negative images containing those structures, refine the policy for joints and shadows, and inspect errors by surface type. Photometric augmentation cannot replace missing examples of confusing real textures.

11. Licensing, metadata and reproducibility

Keep source licenses with every imported subset. OpenCrack states that its benchmark documentation is CC-BY-4.0 but does not relicense the underlying images or annotations; each source dataset retains its own terms. Verify the original provider’s current conditions before redistribution or commercial use because availability and licenses can change.

Release or archive the information needed to recreate the dataset: source identifiers, split manifest, annotation-policy version, class and pixel-value definitions, crop coordinates, preprocessing parameters, random seeds, software versions and evaluation protocol. If images cannot be redistributed, provide stable internal IDs and checksums so authorized users can verify that they are using the same files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

12. An end-to-end preparation checklist

  1. State semantic or instance segmentation and define the class ontology.
  2. Write rules for branches, joints, occlusions, faint boundaries, edges and uncertain pixels.
  3. Choose and document mask values, file formats, naming and orientation conventions.
  4. Collect images covering deployment surfaces, lighting, viewpoints, crack widths and hard negatives.
  5. Record source, scene, session and parent-image metadata.
  6. Annotate a diverse pilot, review disagreements and version the policy.
  7. Create exact image–mask pairs and verify dimensions, values and overlays.
  8. Crop with shared coordinates, retain parent IDs and use overlap where tile boundaries could cut cracks.
  9. Deduplicate, group related observations and create isolated train, validation and test partitions.
  10. Choose preprocessing by inspecting the smallest relevant cracks; transform masks geometrically with images and use categorical interpolation.
  11. Run automated integrity checks, human overlay review and file-loading tests.
  12. Evaluate on a frozen held-out set with metrics appropriate to pixel or instance labels, then archive the complete manifest and license information.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

annotationComputer Visioncrack detectiondataset preparationDeep Learningimage segmentation

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.