DBNet<T>
Models & Types · AiDotNet.ComputerVision.Detection.TextDetection
DBNet (Differentiable Binarization Network) text detector.
Inheritance: ModelBase<T, Tensor<T>, Tensor<T>> → VisionTaskModelBase<T> → TextDetectorBase<T> → DBNet<T>
For Beginners
DBNet is a state-of-the-art text detector that uses differentiable binarization to segment text regions. Unlike traditional methods that use a fixed threshold, DBNet learns an adaptive threshold for each pixel, making it more robust to varying text appearances.
How It Works
Key features:
- Differentiable binarization for end-to-end training
- Adaptive thresholding per pixel
- Fast inference with single-pass architecture
- Works well for both regular and irregular text shapes
Architecture, as in the paper and its reference implementation: a ResNet backbone; a feature pyramid whose four levels are reduced to a common width by 1x1 lateral convolutions, merged top-down, smoothed by 3x3 convolutions to a quarter of that width and upsampled to 1/4 resolution and concatenated; then two identical heads - convolution, batch norm, ReLU, then two stride-2 transposed convolutions back to full resolution - predicting the probability map and the threshold map.
Reference: Liao et al., “Real-time Scene Text Detection with Differentiable Binarization”, AAAI 2020
Constructors
| Constructor | Summary |
|---|---|
DBNet(TextDetectionOptions<T> options, double k) |
Creates a new DBNet text detector. |
Properties
| Property | Summary |
|---|---|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
Task LoadWeightsAsync(string pathOrUrl, CancellationToken cancellationToken) |
|
void SaveWeights(string path) |
|
void SetTrainingMode(bool training) |