Skip to content

Configuration ​

SUMMARY

Iris model wrappers use typed configuration objects for architecture-specific training and post-processing behavior. Shared Trainer settings and export or deployment options are documented with their respective workflows.

RF-DETR ​

RFDETR ​

python
from telekinesis.iris.models import RFDETR

model = RFDETR(
    variant="seg-medium",
    num_classes=1,
    pretrained=True,
)
OptionDefaultDescription
variant"seg-medium"Detection or segmentation model variant
num_classes1Number of class slots used by the model
pretrainedTrueLoads pretrained model weights
resolutionNoneOverrides the variant's native square input resolution
configNoneExplicit RF-DETR model configuration; cannot be combined with resolution
adapter_configNoneOptional RFDETRTrainingAdapterConfig

Detection variants are nano, small, medium, base, and large. Segmentation variants are seg-nano, seg-small, seg-medium, seg-large, seg-xlarge, and seg-2xlarge.

RFDETRTrainingAdapterConfig ​

Controls preprocessing, target conversion, evaluation, and validation previews.

OptionDefaultDescription
validation_images_to_log4Maximum validation predictions logged per evaluation
image_mean(0.485, 0.456, 0.406)Per-channel normalization mean; None disables mean normalization
image_std(0.229, 0.224, 0.225)Per-channel normalization standard deviation
box_format"xyxy"Input target box format: "xyxy" or "cxcywh"
normalize_boxesTrueConverts target boxes to normalized coordinates
background_class_id0Background class slot; None disables background filtering
python
from telekinesis.iris.models import RFDETR, RFDETRTrainingAdapterConfig

adapter_config = RFDETRTrainingAdapterConfig(
    validation_images_to_log=8,
    box_format="xyxy",
    normalize_boxes=True,
    background_class_id=0,
)

model = RFDETR(adapter_config=adapter_config)

RFDETRPostprocessConfig ​

OptionDefaultDescription
confidence_threshold0.3Minimum retained confidence in the range [0, 1]
max_detections300Maximum predictions returned per image

Properties ​

PropertyTypeDescription
modelnn.ModuleUnderlying RF-DETR PyTorch model
adapterRFDETRTrainingAdapterCached training adapter
namestrPublic variant name
train_transformsResizeTransformsTraining dataset transforms
val_transformsResizeTransformsValidation dataset transforms
requires_masksboolTrue for segmentation variants

SAM3-LoRA ​

SAM3LoRA ​

python
from telekinesis.iris.models import SAM3LoRA

model = SAM3LoRA(
    class_names=categories,
    resolution=1008,
    num_negative_prompts=2,
)
OptionDefaultDescription
class_namesrequiredCategory ID-to-prompt mapping or prompt sequence
configNoneOptional SAM3LoRAConfig for model and LoRA settings
training_configNoneOptional SAM3LoRATrainingConfig
resolutionNoneConvenience override for training resolution
num_negative_promptsNoneConvenience override for negative prompts per sample

training_config cannot be combined with the resolution or num_negative_prompts convenience options.

SAM3LoRAConfig ​

Controls checkpoint loading and where LoRA adapters are applied.

OptionDefaultDescription
checkpoint_pathNoneLocal SAM3 base checkpoint
lora_weights_pathNoneExisting LoRA weights to load
load_from_hfTrueLoads base weights from Hugging Face
rank8LoRA rank; must be at least 1
alpha16.0LoRA scaling factor
dropout0.1LoRA dropout in the range [0, 1)
target_modulesstandard projection namesModule-name suffixes eligible for LoRA replacement
apply_to_vision_encoderTrueApplies LoRA to the vision encoder
apply_to_text_encoderTrueApplies LoRA to the text encoder
apply_to_geometry_encoderFalseApplies LoRA to the geometry encoder
apply_to_detr_encoderTrueApplies LoRA to the DETR encoder
apply_to_detr_decoderTrueApplies LoRA to the DETR decoder
apply_to_mask_decoderFalseApplies LoRA to the mask decoder

The default target_modules are q_proj, k_proj, v_proj, out_proj, qkv, proj, fc1, fc2, c_fc, c_proj, linear1, and linear2. When load_from_hf=False, checkpoint_path is required.

SAM3LoRATrainingConfig ​

OptionDefaultDescription
resolution1008Positive square training resolution
num_negative_prompts2Negative category prompts sampled per example

SAM3PostprocessConfig ​

OptionDefaultDescription
confidence_threshold0.3Minimum retained confidence in the range [0, 1]
max_detections300Maximum predictions returned per image
per_prompt_nms_threshold0.5Per-prompt NMS IoU threshold; None disables NMS
prompt_conflict_policy"multi_label""multi_label" retains overlaps; "best_prompt" resolves them
cross_prompt_iou_threshold0.8IoU used to identify cross-prompt conflicts

Properties ​

PropertyTypeDescription
modelnn.ModuleUnderlying SAM3 PyTorch model
adapterSAM3LoRATrainingAdapterCached prompted-training adapter
namestrAlways "sam3-lora"
train_transformsNonePreprocessing is handled by the adapter
val_transformsNonePreprocessing is handled by the adapter
requires_masksboolAlways True

See Train and Resume a Model for Trainer settings and Export and Deploy for export and deployment options.