Skip to content

Versatile Teacher: A Class-aware Teacher-student Framework for Cross-domain Adaptation

License

Notifications You must be signed in to change notification settings

RicardooYoung/VersatileTeacher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is the official repository for the paper Versatile Teacher: A Class-aware Teacher-student Framework for Cross-domain Adaptation.

Preparation

Requirements

This repository is built upon YOLOv5 and follow the same requirements. Please refer to the original repository for more details.

Datasets

Prepare your own datasets in YOLO format and create a corresponding .yaml file in the folder data.

Train

Firstly, use the script

python train.py \
    --cfg models/yolov5l_da.yaml \
    --weights weights/yolov5l.pt \
    --data data/src_data.yaml \
    --data data/tgt_data.yaml \
    --device 0 \
    --epochs 50 \
    --batch-size 16 \

to initialize the teacher model, saved as weights/yolov5l_teacher.pt.

Then, use the script

python train.py \
    --cfg models/yolov5l_da.yaml \
    --cfg models/yolov5l.yaml \
    --weights weights/yolov5l_teacher.pt \
    --weights weights/yolov5l_teacher.pt \
    --data data/src_data.yaml \
    --data data/tgt_data.yaml \
    --device 0 \
    --epochs 50 \
    --batch-size 16 \

to train the student model.

About

Versatile Teacher: A Class-aware Teacher-student Framework for Cross-domain Adaptation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published