使用最新的PaddleDetection,run 了yolov4的模型报错,
环境aistudio GPU环境,python3.6,paddle1.7.1, 1.8都试了有问题,问题如下
Traceback (most recent call last):
File "tools/train.py", line 366, in
main()
File "tools/train.py", line 113, in main
train_fetches = model.train(feed_vars)
File "/home/aistudio/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 156, in train
return self.build(feed_vars, mode='train')
File "/home/aistudio/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 85, in build
gt_score, targets)
File "/home/aistudio/PaddleDetection/ppdet/modeling/anchor_heads/yolo_head.py", line 294, in get_loss
self.prefix_name)
File "/home/aistudio/PaddleDetection/ppdet/modeling/losses/yolo_loss.py", line 69, in call
mask_anchors, self._ignore_thresh)
File "/home/aistudio/PaddleDetection/ppdet/modeling/losses/yolo_loss.py", line 169, in _get_fine_grained_loss
num_classes, downsample, self._ignore_thresh, scale_x_y)
File "/home/aistudio/PaddleDetection/ppdet/modeling/losses/yolo_loss.py", line 294, in _calc_obj_loss
scale_x_y=scale_x_y)
TypeError: yolo_box() got an unexpected keyword argument 'scale_x_y'
基本的语法错误了,yolo_box()没有"scale_x_y"这个关键字参数。
对照着yolo_box函数看看,或者检查一下拼写
不是语法错了,是版本管理的问题,github上提的issue回复了
master分支yolov4只能develop版本paddle,不然要切分支
那就是版本问题了
AI studio 平台有了吗
官方应该在努力了,现在可能到调参阶段
看了B站的效果很惊艳啊
有了
我这个就是paddletection里的版本
paddle实现的版本具体效果可以参考这个https://paddledetection.readthedocs.io/featured_model/YOLO_V4.html
应该除了数据增强用到的四张图片裁剪拼接的“马赛克”数据增强还没实现外,其余trick都实现了
ok
把paddledetection换成0.3就可以用了,master版本的paddledetection好像必须配paddlepaddle2.0.0alpha一起用