CSPDarknet<T>
Models & Types · AiDotNet.ComputerVision.Detection.Backbones
CSP-Darknet backbone network used in YOLO family models (v5, v7, v8).
Inheritance: NeuralNetworkBase<T> → CSPDarknet<T>
Implements: IDetectionBackbone<T>
For Beginners
CSP-Darknet is a specialized feature extraction network designed for real-time object detection. It uses Cross-Stage Partial connections to reduce computation while maintaining accuracy.
How It Works
Reference: Bochkovskiy et al., “YOLOv4: Optimal Speed and Accuracy of Object Detection”
Constructors
| Constructor | Summary |
|---|---|
CSPDarknet(IActivationFunction<T> activation, CSPDarknetOptions options) |
Creates a new CSP-Darknet backbone. |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<int> OutputChannels { get; } |
|
IReadOnlyList<int> Strides { get; } |
|
bool IsFrozen { get; set; } |
|
string Name { get; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, Tensor<T>> GetNamedLayerActivations(Tensor<T> input) |
Returns the per-layer activations produced by a forward pass, keyed by a human-readable name. |
IFullModel<T, Tensor<T>, Tensor<T>> WithParameters(Vector<T> parameters) |
|
IReadOnlyList<Tensor<T>> GetFeatureMaps(Tensor<T> input) |
|
List<Tensor<T>> ExtractFeatures(Tensor<T> input) |
|
ModelMetadata<T> GetModelMetadata() |
|
ValueTuple<int, int> GetExpectedInputSize() |
|
void Freeze() |
|
void ReadParameters(BinaryReader reader) |
|
void Unfreeze() |
|
void WriteParameters(BinaryWriter writer) |