Neural

DeepNet

Main neural-network interface for training, detection, tracking, prediction, and export.

43 config keys · 16 public methods

Import

from Xenonix.Neural import DeepNet

Search this API

Filter methods, arguments, and configuration keys on this page.

Configuration

Use Config(...) with these keys where the class exposes configuration.

Config key Default Common values What it controls
Verbose True True, False Prints/logs progress and status messages.
Model 'Medium' Small, Medium, Large, XSmall, XLarge, custom path Model size/name/path selector.
Variant 'B' A, B, C, custom Model variant.
Channels 128 Any valid value Neural feature channel count.
Inference 'HBB' classify, hbb, hbbv2, segment, pose, obb, obbv2 Neural task type such as classify, detect, segment, pose, OBB, or HBB.
GPU True True, False Uses GPU acceleration where available.
Layer_Start None Any valid value First layer used for training/inference where supported.
Layers None Any valid value Layer list/selection.
FPN_Layers None Any valid value Feature-pyramid layers.
Data False Any valid value Dataset path or dataset configuration.
Val_Freq 1 Any valid value Validation frequency.
Val_Subset 0 Any valid value Validation subset size/count.
Image_Size False Any valid value Input image size.
Learning_Rate None Any valid value Training learning rate.
Epoch 20 Any valid value Number of training epochs.
Batch_Size 2 Any valid value Training/inference batch size.
Worker 4 Any valid value Number of data-loader workers.
Patience None Any valid value Early-stop patience.
Step None Any valid value Learning-rate step schedule.
Gamma 0.1 Any valid value Learning-rate decay factor.
Momentum 0.9 Any valid value Optimizer momentum.
Weight_Decay None Any valid value Weight decay regularization.
Callback False Any valid value Optional progress callback.
Threshold 0.5 Any valid value Confidence threshold.
NMS 0.5 Any valid value Non-maximum suppression overlap threshold.
NMS_Batch False Any valid value Batch NMS setting.
Test_Threshold 0.3 Any valid value Threshold used during testing.
Margin 10 Any valid value Extra region margin.
Max_Age 30 Any valid value Maximum track age before dropping a track.
Pretrained True True, False Uses pretrained weights where available.
Export_Opset 20 Any valid value ONNX export opset version.
Mask_Quality False Any valid value Mask quality setting.
Mask_Layers 4 Any valid value Number of mask layers.
Detections 300 Any valid value Maximum detections to keep.
TopK 1000 Any valid value Top-K candidates to keep.
Pre_Top 2000 Any valid value Candidates kept before filtering.
Post_Top 1000 Any valid value Candidates kept after filtering.
Text_Region False Any valid value Draws/shows region text.
Text_Class True Any valid value Draws/shows class text.
Text_Score False Any valid value Draws/shows score text.
Text_ID False Any valid value Draws/shows track ID text.
Anchor_Scale None Any valid value Anchor scale list/setting.
Anchor_Ratio None Any valid value Anchor ratio list/setting.

Public methods

Create

Creates a new DeepNet instance.

Create(Path=False)

Arguments

Argument Default Accepted values What it does
Path False Any valid value File path used for reading or writing.

Output

Creates a new DeepNet object.

Config_Get

Reads one or more configuration values by name.

Config_Get(*Input)

Arguments

Argument Default Accepted values What it does
Input *args Any valid value Input value used by the operation.

Output

Returns selected configuration values.

Config

Changes one or more supported settings. Pass only the configuration keys you want to update.

Config(**Input)

Arguments

Argument Default Accepted values What it does
Input **kwargs Any valid value Input value used by the operation.

Output

Updates configuration values on the object.

Pause

Requests the active training or long-running neural process to pause.

Pause()

Arguments

No arguments.

Output

Runs the operation. Some methods update the object in place.

Resume

Resumes a paused neural process.

Resume()

Arguments

No arguments.

Output

Runs the operation. Some methods update the object in place.

Exit

Requests the active neural process to stop/exit cleanly.

Exit()

Arguments

No arguments.

Output

Runs the operation. Some methods update the object in place.

Test

Runs the current trainer test/validation routine.

Test()

Arguments

No arguments.

Output

Returns the calculated result.

Matrix

Builds or shows the confusion matrix for the current trainer.

Matrix()

Arguments

No arguments.

Output

Runs the operation. Some methods update the object in place.

Train

Starts training using the configured model, dataset, and inference type.

Train()

Arguments

No arguments.

Output

Runs the operation. Some methods update the object in place.

Detect

Runs object detection on a frame and returns detections/overlay data.

Detect(Frame)

Arguments

Argument Default Accepted values What it does
Frame Required Any valid value Input image/frame data. Can be an image object, array, or frame accepted by this tool.

Output

Returns the calculated result.

Track

Runs detection with tracking state and returns tracked results.

Track(Frame)

Arguments

Argument Default Accepted values What it does
Frame Required Any valid value Input image/frame data. Can be an image object, array, or frame accepted by this tool.

Output

Returns the calculated result.

Predict

Runs the model prediction pipeline on a frame.

Predict(Frame)

Arguments

Argument Default Accepted values What it does
Frame Required Any valid value Input image/frame data. Can be an image object, array, or frame accepted by this tool.

Output

Returns the calculated result.

Export

Exports the configured/trained model, typically to ONNX.

Export()

Arguments

No arguments.

Output

Returns the calculated result.

Accuracy

Returns or displays the accuracy metric helper.

Accuracy()

Arguments

No arguments.

Output

Returns the calculated result.

Performance

Displays performance metric helper/output.

Performance(Fixed=True)

Arguments

Argument Default Accepted values What it does
Fixed True Any valid value Turns fixed on or off.

Output

Runs the operation. Some methods update the object in place.

Precision

Displays precision metric helper/output.

Precision(Fixed=True)

Arguments

Argument Default Accepted values What it does
Fixed True Any valid value Turns fixed on or off.

Output

Runs the operation. Some methods update the object in place.