Code for paper ToBL: Towards Better Labeling for Open World SAR Object Detection.
- Linux or macOS with Python ≥ 3.8.
- Install PyTorch ≥ 1.9.0, torchvision, Detectron2, timm, and einops.
Recommended detectron2 installation method:
conda install conda-forge::detectron2 pip install protobuf==3.20.* pip install tensorboard pip install black==21.4b2 - Prepare datasets:
- Download SAR-AIRcraft 1.0 and SARDet-100k.
- Convert SARDet-100k annotation format using
coco_to_voc.py. - Move all images to
datasets/JPEGImagesand annotations todatasets/Annotations. - run
pip install -r requirements.txt - To build object keypoints, run
python datasets/build_keypoints.py, then modify config file t1.yaml(SCATTER_FILENAME)
- Training for open world SAR object detection:
Evaluation for open world object detection:
bash run_aircraft.sh bash run_sardet100k.sh
bash test_owod.sh
- Visualize the results:
python demo.py -i LIST_OF_IMAGES # or use fiftyone sh core/visualization/vis_fiftyone.sh - Note that we are using an ImageNet pre-trained backbone. To switch to a DINO pre-trained backbone, please download the model weights and then follow these instructions.
The following results were obtained with four NVIDIA 3090 GPUs, using the checkpoints at this link.
If you find this code useful, please consider citing:
Our implementation is based on OrthogonalDet which uses Detectron2 and Sparse R-CNN. Their contributions have significantly advanced and promoted research in this field.

