label_processing.detect_empty_labels

Empty Label Detection Module

Classifies label images as empty or non-empty based on the proportion of dark pixels within a cropped region. Used as the first filtering step in the traditional pipeline.

Functions

detect_dark_pixels(image, crop_box[, threshold])

Detect the proportion of dark pixels in an image.

find_empty_labels(input_folder, output_folder)

Find and copy empty and non-empty labels to respective folders (keeps originals in input).

is_empty(image, crop_margin, threshold)

Determines if an image is empty based on a given threshold and crop margin.