axinc-ai / ailia-models

The collection of pre-trained, state-of-the-art AI models for ailia SDK
2.04k stars 323 forks source link

ADD ByteTrack #614

Closed kyakuno closed 3 years ago

kyakuno commented 3 years ago

https://github.com/ifzhang/ByteTrack

ooe1123 commented 3 years ago

付属のツールでonnxエクスポート可能

python3 tools/export_onnx.py --output-name bytetrack_x_mot17.onnx -f exps/example/mot/yolox_x_mix_det.py -c pretrained/bytetrack_x_mot17.pth.tar
python3 tools/export_onnx.py --output-name bytetrack_x_mot20.onnx -f exps/example/mot/yolox_x_mix_mot20_ch.py -c pretrained/bytetrack_x_mot20.tar
ooe1123 commented 3 years ago

○ Train

from yolox.exp import Exp as MyExp from yolox.data import get_yolox_datadir

class Exp(MyExp): def init(self): super(Exp, self).init() self.num_classes = 1 self.depth = 0.33 self.width = 0.375 # -- 変更 self.scale = (0.5, 1.5) # -- 変更 self.exp_name = os.path.split(os.path.realpath(file))[1].split(".")[0] self.enable_mixup = False # -- 追加 self.train_ann = "train.json" self.val_ann = "train.json" self.input_size = (416, 416) # -- 変更 self.test_size = (416, 416) # -- 変更 self.random_size = (10, 20) # -- 変更 self.max_epoch = 80 self.print_interval = 20 self.eval_interval = 5 self.test_conf = 0.001 self.nmsthre = 0.7 self.no_aug_epochs = 10 self.basic_lr_per_img = 0.001 / 64.0 self.warmup_epochs = 1


- Train実行

python3 tools/train.py -f exps/example/mot/yolox_tiny_mix_det.py -d 0 -b 48 --fp16 -o -c pretrained/yolox_tiny_32dot8.pth


- Resume時

python3 tools/train.py -f exps/example/mot/yolox_tiny_mix_det.py -d 0 -b 48 --fp16 -o -c ./YOLOX_outputs/yolox_tiny_mix_det/latest_ckpt.pth.tar --resume