Code of MICCAI 2023 paper: "Unsupervised Domain Adaptation for Anatomical Landmark Detection".
git clone https://github.com/jhb86253817/UDA_Med_Landmark.git
conda create -n uda_med_landmark python=3.9
conda activate uda_med_landmark
pip install -r requirements.txt
RawImage
and AnnotationsByMD
under data/Head/
.Cephalograms
and Cephalometric_Landmarks
of the training set under data/HeadNew/
.All247images
under data/JSRT/
. Collect the landmark annotations from HybridGNet and put them under data/JSRT/annos/
. Run the preprocess.py
under data/JSRT
to generate Images
. CXR_png
under data/Montgomery/
. Collect the landmark annotations from HybridGNet and put them under data/Montgomery/annos_RL/
and data/Montgomery/annos_LL/
. Run the preprocess.py
under data/Montgomery
to generate Images
; 2) For Shenzhen, put the downloaded CXR_png
under data/Shenzhen/
. Collect the landmark annotations from HybridGNet and put them under data/Shenzhen/annos_RL/
and data/Shenzhen/annos_LL/
. Run the preprocess.py
under data/Shenzhen
to generate Images
; 3) For Padchest, download the landmark annotations from here, unzip it and put it under data/Padchest/annos
. Then select those images with landmark annotations and put them under data/Padchest/Images/
.You will have the following structure:
UDA_Med_Landmark
-- data
|-- Head
|-- RawImage
|-- AnnotationsByMD
|-- HeadNew
|-- Cephalograms
|-- Cephalometric_Landmarks
|-- img2size.json
|-- img2dist.json
|-- train_list.txt
|-- test_list.txt
|-- JSRT
|-- All247images
|-- preprocess.py
|-- Images
|-- annos
|-- Montgomery
|-- CXR_png
|-- preprocess.py
|-- Images
|-- annos_RL
|-- annos_LL
|-- train_list.txt
|-- test_list.txt
|-- Shenzhen
|-- CXR_png
|-- preprocess.py
|-- Images
|-- annos_RL
|-- annos_LL
|-- train_list.txt
|-- test_list.txt
|-- Padchest
|-- Images
|-- annos
|-- train_list.txt
|-- test_list.txt
Take cephalometric landmark detection as example.
lib
, run preprocess.py Head
and preporcess.py HeadNew
to preprocess the two datasets, respectively.UDA_Med_Landmark
, configure the command in run_train.sh
as needed, then run bash run_train.sh
to start training.Take cephalometric landmark detection as example.
Head
and HeadNew
the same way as in training.UDA_Med_Landmark
, configure the command in run_test.sh
as needed, then run bash run_test.sh
to start testing.Trained model weights: