ComputerVisionMetrics.jl is a Julia package for evaluating segmentation models using various metrics like Dice and Hausdorff distances. The primary functions are dice_metric()
and hausdorff_metric()
which evaluate the similarity and dissimilarity between predicted and ground truth segmentations respectively.
- Supports 2D and 3D segmentation masks
- Provides functions to calculate Dice and Hausdorff metrics
- Offers additional utility functions like
get_mask_edges
andeuc
for edge detection and Euclidean distance calculation
using Pkg
Pkg.add("ComputerVisionMetrics")
Basic usage involves passing your predicted and ground truth segmentation masks to the metric functions:
using ComputerVisionMetrics
# Load your data
prediction = rand([0, 1], 10, 10, 10)
ground_truth = rand([0, 1], 10, 10, 10)
# Evaluate Dice metric
dice_score = dice_metric(prediction, ground_truth)
# Evaluate Hausdorff metric
hausdorff_score = hausdorff_metric(prediction, ground_truth)
For more advanced usage and options, see the documentation