TorchGeoDetector#
- class geowombat.detect.TorchGeoDetector(model='faster-rcnn', weights=None, num_classes=None, classes=None, device='auto')[source]#
Bases:
GeoWombatDetectorDetection wrapper around TorchGeo / torchvision detection models.
Supports Faster R-CNN and RetinaNet via torchvision with optional pretrained weights from TorchGeo (e.g. xView). Axis-aligned only.
- Parameters:
- model{‘faster-rcnn’, ‘retinanet’}
Detection head. Default ‘faster-rcnn’.
- weightsstr, optional
TorchGeo weights enum string (e.g. ‘FCN_RESNET50_XVIEW’) or path to a state dict. If None, uses torchvision COCO pretrained.
- num_classesint, optional
Number of classes including background. Required when loading a custom-trained checkpoint.
- classeslist of str, optional
Class names corresponding to non-background ids 1..N.
- devicestr
‘cpu’, ‘cuda’, or ‘auto’. Default ‘auto’.
- Attributes:
- class_names
Methods
predict(src[, tile_size, overlap, conf, ...])Run tiled, georeferenced inference over a raster.
Notes
For aerial / satellite imagery, the most useful TorchGeo weights are typically ‘FASTERRCNN_RESNET50_FPN_XVIEW’ (when available in your TorchGeo version). Check
torchgeo.modelsfor the current catalogue.Attributes Summary
Attributes Documentation
- oriented = False#