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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Start by measuring the crack-pixel prevalence in your own training split, then compare losses and sampling policies under the same data split. Binary cross-entropy (BCE) and Dice are sensible baselines for mild imbalance; weighted BCE, focal, Dice-based, compound, or Focal Tversky losses become candidates as the foreground gets sparser. Do not treat any published loss ranking as universal: threshold choice, patch selection, annotation policy, model, and surface conditions can change the result.

What class imbalance means in crack segmentation

In a binary crack-segmentation mask, each pixel is usually either background or crack. Concrete images contain far more background pixels than crack pixels because cracks are thin, discontinuous structures. A model can therefore obtain a high pixel-accuracy score by predicting background almost everywhere while missing the defects that matter.

Use “imbalance ratio” only with its stated definition. The crack-segmentation study by Quang Du Nguyen and Huu-Tai Thai (published in Engineering Structures, 2023) reports ratios calculated for its datasets; those values are not a universal cutoff for every camera, resolution, annotation style, or patching strategy. A ratio of 300:1 in one collection may not represent the same difficulty as 300:1 in another if cracks differ in width, contrast, or continuity.

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

The practical objective is not merely to make crack pixels count more. You need a model that finds faint and thin cracks (recall) without turning joints, stains, shadows, aggregate boundaries, or texture into excessive false positives (precision). Loss design, sampling, and the probability threshold all affect that trade-off.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

What the comparative evidence shows

Nguyen and Thai compared 12 commonly used loss functions on four crack datasets. Their main conclusion is conditional: losses tend to perform similarly on mildly imbalanced data, while weighted BCE, focal, Dice-based, and compound losses gain an advantage as imbalance becomes more severe. Their highlights call Focal Tversky the most robust loss in their severe-imbalance comparison, but the authors also report that rankings vary with the dataset, model, and imbalance severity.

“The results show that most loss functions achieve relatively similar accuracy on mildly imbalanced datasets, while weighted binary cross-entropy loss, Focal loss, Dice-based loss, and compound loss functions significantly outperform others as imbalance severity increases.” — Quang Du Nguyen and Huu-Tai Thai, Engineering Structures, 2023

Read that result as a selection rule, not as a promise that one loss will win on your imagery. Reproduce the comparison on a fixed validation protocol before changing several variables at once.

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

Dataset sizes and reported imbalance ratios

Dataset Images Reported imbalance ratio Context
GAPs384 384 278:1 Ratio reported by Nguyen and Thai (2023)
CRKWH100 100 218:1 Ratio reported by Nguyen and Thai (2023)
Labeled Cracks in the Wild (LCW) 3,817 332:1 Ratio reported by Nguyen and Thai (2023)
CrackLS315 315 394:1 Ratio reported by Nguyen and Thai (2023)

Those figures describe the four collections and the paper’s calculation. They do not establish that a ratio of 218:1 is “mild” or 394:1 is “severe” for every project. Calculate prevalence after applying your own resize, crop, and label rules.

The same paper describes DeepCrack as 537 images at 544 × 384 pixels and EdmCrack600 as 600 images at 1,920 × 1,080 pixels, both with pixel-wise annotations. DeepCrack includes concrete and asphalt pavement imagery, so a model trained or evaluated on it may encounter material and scene variation beyond concrete walls or slabs.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Diagnose imbalance before choosing a remedy

Measure prevalence on the training split

For every training image or patch, count crack pixels and divide by total pixels. Report the median, mean, minimum, maximum, and the fraction of images with no positive pixels. A single global ratio can hide a difficult distribution: many empty images plus a few heavily cracked images require different sampling from a collection in which every image contains a faint line.

crack_prevalence = crack_pixels / total_pixels
background_to_crack = background_pixels / max(crack_pixels, 1)

Compute these statistics after the same resizing and mask rasterization used in training. A one-pixel line can disappear during downsampling, changing the effective imbalance and the task itself.

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

Inspect variation by scene and crack type

  • Group prevalence by site, structure, camera, lighting, and surface finish.
  • Record whether labels include hairline cracks, branching cracks, spalls, joints, or only clearly visible segments.
  • Review very thin positives at the model’s final resolution; if the annotation is narrower than a pixel, loss tuning cannot recover information that was removed during preprocessing.
  • Look at empty patches containing crack-like texture. They are valuable negative examples, but their proportion should be intentional rather than accidental.

Prevent leakage when creating patches

Split by source image, structure, or inspection site before extracting patches whenever neighboring crops could share the same crack. Randomly splitting overlapping patches can place nearly identical pixels in training and validation, making both imbalance and loss comparisons look easier than they are. Keep the held-out images untouched until threshold selection and final evaluation are complete.

How each loss responds to sparse crack pixels

Loss family What it emphasizes When to test it Main caution
Binary cross-entropy (BCE) Per-pixel probabilistic classification Baseline and mildly imbalanced data Can be dominated by easy background pixels
Weighted BCE Greater contribution from crack pixels Foreground is rare and recall is inadequate Excessive weights can create false positives or unstable gradients
Focal loss Down-weights well-classified examples and focuses on difficult pixels Many easy background pixels or hard, faint positives Alpha and gamma require validation; settings are not universal
Dice loss Overlap between predicted and reference masks Mild-to-severe imbalance, especially when overlap is the priority Small objects and empty-mask handling need careful implementation
Jaccard (IoU) loss Intersection over union When IoU alignment is important Can have different optimization behavior from Dice despite similar purpose
Tversky-family loss Adjustable penalty for false positives versus false negatives When the operating cost is asymmetric Parameters can trade missed cracks for noisy masks
Focal Tversky Tversky weighting plus focus on hard examples Very sparse foreground and difficult thin cracks Strong result in the cited study, but still dataset- and model-dependent
Compound losses Combines complementary pixel and overlap objectives When one objective alone leaves a clear failure mode More hyperparameters and more opportunities to mask a bad sampling policy

BCE as the control condition

Train an unweighted BCE model first. It gives you a calibration and optimization reference and can expose label or preprocessing problems before more specialized losses are introduced. If it predicts almost all background, inspect prevalence, patch composition, and thresholding before assuming the loss is the only issue.

Weighted BCE

Weighting increases the penalty for crack-pixel errors. Derive a starting weight from training prevalence, then test a small range rather than using the raw inverse frequency blindly. Very large weights may make the model label crack-like texture everywhere. Record the chosen weight with the dataset split because changing patch selection changes the effective class frequency.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Focal loss

Focal loss reduces the influence of examples the model already classifies confidently and concentrates learning on difficult pixels. Implementations commonly expose alpha and gamma; verify the current library’s argument names, reduction behavior, and expected logits or probability inputs. A high gamma is not automatically better: it can reduce useful gradient from legitimate, easy crack pixels.

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.

Dice and Jaccard losses

Overlap losses counter the dominance of background by directly rewarding agreement on the crack region. They are useful baselines alongside BCE, especially when masks are sparse. Define how an image with an empty reference mask is handled, and check whether your implementation computes the score per image or over the whole batch; the two choices can produce different gradients when positive pixels are rare.

Tversky and Focal Tversky

Tversky parameters let you penalize false negatives more than false positives, or the reverse. Favoring recall can help inspection systems in which a missed crack is costly, while stronger false-positive penalties may be necessary when every predicted region triggers manual review. The 2023 comparison ranked Focal Tversky as the most robust for the severely imbalanced datasets it tested; validate that behavior on your concrete surfaces rather than treating the ranking as a guarantee.

Compound objectives

A compound objective can combine BCE with Dice, or another pixel term with an overlap term. Use it only after establishing single-loss baselines. Otherwise, a change in performance is difficult to attribute to overlap optimization, pixel calibration, or a hidden change in gradient scale.

Sampling and patch construction are separate from loss design

Changing the loss changes how errors are valued; changing sampling changes which examples the model sees. Tune these interventions separately first, then test a combined configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Sampling choice Benefit Risk Practical guardrail
Oversample crack-containing images or patches Raises minority exposure and reduces batches with no positives Repeats examples, amplifies label noise, and adds little diversity Track unique source images and cap repetition; retain varied negatives
Undersample background Reduces easy negative volume Can remove global context and realistic crack-like backgrounds Keep a deliberate quota of hard and scene-level negatives
Remove empty patches Improves training efficiency when most crops are blank Model may lose context and calibration for genuinely empty scenes Remove only a controlled fraction and evaluate on natural prevalence
Stratify batches by prevalence Makes gradient exposure more consistent Batch distribution may no longer match deployment Use natural-prevalence validation and test sets

Oversampling does not create new crack shapes, lighting conditions, or annotation quality. Conversely, deleting every non-crack patch can make a model unfamiliar with the background it will see in inspection. Keep some empty and crack-like negative patches, and preserve source-image context when the deployment decision is made at image level.

A controlled workflow for selecting loss and sampling

  1. Freeze the data split. Split by image, structure, or site before patch extraction. Document resolution, resize policy, mask format, and augmentation.
  2. Profile the foreground. Calculate per-image and per-patch crack prevalence, the empty-patch fraction, and prevalence by scene. Save the statistics with the experiment.
  3. Train two baselines. Use BCE and a Dice-based loss with identical architecture, optimizer, augmentation, epochs, and early-stopping rule.
  4. Add one imbalance-focused loss. Compare weighted BCE or focal loss. If the foreground is extremely sparse or recall remains poor, add Focal Tversky as a separate experiment.
  5. Test sampling without changing the loss. Compare natural sampling with a documented oversampling or controlled empty-patch reduction. Keep the validation distribution unchanged.
  6. Tune the probability threshold on validation images. Do not assume 0.5 is optimal. Select a threshold using the operational precision/recall requirement, then lock it before touching the test set.
  7. Evaluate held-out images and scenes. Report precision, recall, Dice, and IoU, plus false-positive and false-negative examples. Include results by scene or prevalence bucket when possible.
  8. Inspect overlays. Review crack-like texture, shadows, joints, stains, hairline cracks, and disconnected predictions. A single aggregate score cannot reveal whether errors are operationally acceptable.
  9. Repeat the comparison across seeds or folds when the dataset is small. Four-hundred images or fewer can produce unstable rankings if one split contains unusually difficult surfaces.

Threshold selection changes the apparent winner

The network outputs a probability map; converting it to a binary mask requires a threshold. A lower threshold generally recovers more faint pixels but can increase false positives. A higher threshold is cleaner but may erase thin or low-contrast cracks.

In the Nguyen and Thai comparison, BCE performed best at thresholds between 0.25 and 0.45 for the mildly imbalanced datasets examined. The authors described Dice-based losses as less sensitive to threshold changes and suggested 0.5 in that context. These are study-specific observations, not defaults for every model or camera.

  1. Generate validation probability maps once for each trained model.
  2. Evaluate a threshold grid, such as 0.10 through 0.90, using a consistent step size.
  3. Choose the threshold against a declared objective: minimum recall, a precision floor, maximum Dice, or an inspection cost function.
  4. Freeze that threshold and report test metrics only once.
  5. Store the threshold with the model version; changing it in production changes the effective classifier even when weights are unchanged.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Metrics that expose imbalance-related failures

Always pair overlap metrics with error-direction metrics. Pixel accuracy is inadequate when background dominates.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Precision: Of predicted crack pixels, how many are labeled crack? This reveals false-positive burden.
  • Recall (sensitivity): Of labeled crack pixels, how many were found? This exposes missed defects.
  • Dice: A balanced overlap score that is informative for sparse masks.
  • IoU (Jaccard): Intersection divided by union; useful for comparison with segmentation benchmarks.
  • Threshold sensitivity: Plot precision, recall, Dice, and IoU across thresholds rather than reporting one arbitrary cutoff.
  • Image- and scene-level review: Inspect representative overlays and categorize false positives and false negatives by surface, lighting, crack width, and site.

Report whether metrics are calculated per image and then averaged or pooled over all pixels. Pooled scores can be dominated by large images, while per-image scores show consistency across inspections.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Implementation notes for PyTorch-based projects

Segmentation Models PyTorch documentation provides Dice and Focal loss implementations, including focal-loss parameters such as alpha and gamma. APIs and input conventions can change, so check the installed version and confirm whether each loss expects logits, probabilities, channel-first tensors, and a particular binary-mode label shape.

# Illustrative experiment structure; verify names and arguments for your installed version
losses = {
    "bce": binary_cross_entropy_with_logits,
    "dice": dice_loss,
    "focal": focal_loss(alpha=ALPHA, gamma=GAMMA),
    "focal_tversky": focal_tversky_loss(alpha=TV_ALPHA,
                                         beta=TV_BETA,
                                         gamma=TV_GAMMA),
}

for name, loss_fn in losses.items():
    train_with_same_split_model_and_schedule(loss_fn)
    save_validation_probability_maps(name)
    select_threshold_on_validation(name)
    evaluate_locked_threshold_on_test(name)

Keep the experiment harness constant: augmentation, batch size, learning-rate schedule, number of updates, checkpoint rule, and post-processing must not change between losses. Otherwise, you are comparing training recipes rather than loss functions.

Troubleshooting common outcomes

High accuracy, near-zero recall

  • Check the positive-pixel count after resizing and mask conversion.
  • Inspect whether batches contain any crack pixels.
  • Evaluate lower validation thresholds before changing the architecture.
  • Compare weighted BCE, focal, or Dice against the BCE baseline.

Recall improves but false positives explode

  • Raise or re-tune the threshold on validation data.
  • Restore hard negative and empty-scene patches removed during sampling.
  • Reduce an overly aggressive crack weight or focal/Tversky setting.
  • Review whether labels omit subtle background features the model is learning as positives.

Training becomes unstable after weighting

  • Reduce the class weight or focal emphasis and monitor gradient and loss scale.
  • Verify that the loss receives logits versus probabilities as required.
  • Check empty-mask behavior in Dice or Tversky calculations.
  • Compare batch composition and learning-rate settings with the baseline.

Validation looks excellent but a new site fails

  • Look for source-site leakage in the split.
  • Compare lighting, camera distance, concrete finish, and crack width between sites.
  • Evaluate by site and prevalence bucket, not only one global score.
  • Retune the threshold only with a representative validation set; do not use the test site to select it.

Oversampling helps training but not deployment

Oversampling changes the training distribution, not the natural prevalence at inspection time. Keep validation and test data at deployment-like prevalence, and calibrate the threshold there. If repeated patches dominate training, add new scenes or more diverse annotations rather than endlessly repeating the same crack.

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

Choosing an approach by operational priority

Your situation First comparison What to watch
Mild imbalance and adequate positives per batch BCE versus Dice or Jaccard Overlap and threshold stability
Very sparse crack pixels Weighted BCE, focal, Dice-based, and Focal Tversky Recall gains versus false-positive growth
Missed cracks are most costly Tversky settings favoring false-negative reduction, plus threshold sweep Precision floor and review workload
Manual review is expensive Dice/Jaccard or a balanced compound loss with hard negatives False positives on joints, stains, and texture
Many empty patches Controlled empty-patch reduction, then compare losses Loss of scene context and natural calibration
Small, heterogeneous dataset Simple baselines plus repeated splits or seeds Ranking stability across sites and scenes

Deployment and reporting checklist

  • State the image resolution, mask definition, and preprocessing used to calculate prevalence.
  • Give the split unit (image, structure, or site) and confirm that patches were extracted after splitting.
  • Report the loss, class weights or focal/Tversky parameters, sampling policy, and probability threshold.
  • Include precision, recall, Dice, and IoU, with the threshold-selection rule.
  • Show representative false-positive and false-negative overlays, including faint and thin cracks.
  • Describe how empty reference masks are scored.
  • Test on the concrete surfaces and acquisition conditions expected in deployment.
  • Reassess calibration if camera resolution, lighting, annotation policy, or patch size changes.

No loss can compensate for missing crack labels, leakage between train and validation, or a deployment scene unlike the training data. Treat imbalance handling as an experiment across data composition, objective, and threshold—not as a one-line hyperparameter choice.

Bottom line

Measure your own crack prevalence first. Use BCE and Dice as controlled baselines, then test weighted BCE or focal loss and, for very sparse foregrounds, Focal Tversky or another Dice/Tversky-based objective. Evaluate sampling independently, preserve useful background context, choose the threshold on validation data, and report precision, recall, Dice, IoU, and qualitative errors on held-out scenes. The 2023 four-dataset comparison supports this progression, but its rankings remain bounded by its datasets and model setup; your concrete imagery must decide the final configuration.

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.