Skip to content

Latest commit

 

History

History
106 lines (75 loc) · 3.09 KB

README.md

File metadata and controls

106 lines (75 loc) · 3.09 KB

Leveraging Anatomical Consistency for Multi-Object Detection in Ultrasound Images via Source-free Unsupervised Domain Adaptation

PostScript

This project is the pytorch implemention of AATS;

Our experimental platform is configured with One RTX3090 (cuda>=11.0);

Currently, this code is avaliable for public dataset CardiacUDA and FUSH;

Installation

Prerequisites

  • Python ≥ 3.6
  • PyTorch ≥ 1.5 and torchvision that matches the PyTorch installation.
  • Detectron2 == 0.5

Install python env

To install required dependencies on the virtual environment of the python (e.g., virtualenv for python3), please run the following command at the root of this code:

$ python3 -m venv /path/to/new/virtual/environment/.
$ source /path/to/new/virtual/environment/bin/activate

For example:

$ mkdir python_env
$ python3 -m venv python_env/
$ source python_env/bin/activate

Build Detectron2 from Source

Follow the INSTALL.md to install Detectron2.

Dataset download

  1. Download the datasets

  2. Organize the dataset as the COCO annotation format.

Training

  • Train the AATS under Center 1 of Heart (source) and Center 2 of Heart (target) on FUSH dataset
python train_net.py \
      --num-gpus 1 \
      --config configs/sfda_at_rcnn_vgg_fetus_4c_1to2.yaml\
      OUTPUT_DIR output/AATS_4c_1to2
  • Train the AATS under Center 2 of Heart (source) and Center 1 of Heart (target) on FUSH dataset
python train_net.py\
      --num-gpus 1\
      --config configs/sfda_at_rcnn_vgg_fetus_4c_2to1.yaml\
      OUTPUT_DIR output/AATS_4c_2to1

Resume the training

python train_net.py \
      --resume \
      --num-gpus 1 \
      --config configs/sfda_at_rcnn_vgg_fetus_4c_1to2.yaml MODEL.WEIGHTS <your weight>.pth

Evaluation

python train_net.py \
      --eval-only \
      --num-gpus 1 \
      --config configs/sfda_test.yaml \
      MODEL.WEIGHTS <your weight>.pth

Results and Model Weights

We will publish the VGG pre-training weights and model weights soon.

Code Reference