misads / easy_detection

一个简单方便的目标检测框架(PyTorch环境可直接运行,不需要cuda编译),支持Faster_RCNN、Cascade_RCNN、Yolo系列、SSD等经典网络。
MIT License
262 stars 41 forks source link

请问怎样运行effedet呢? #16

Open ma3252788 opened 3 years ago

ma3252788 commented 3 years ago

请问有没有示例命令呀? 我用的--model Effdet --transform frcnn --scheduler 1x --save_freq 1 --tag eff 会直接报错:

Traceback (most recent call last):
  File "/media/mcj/mcj/detection_mcj/train.py", line 56, in <module>
    model = Model(opt, logger)
  File "/media/mcj/mcj/detection_mcj/network/Effdet/Model.py", line 43, in __init__
    self.detector = get_net().to(device=opt.device)
  File "/media/mcj/mcj/detection_mcj/network/Effdet/Model.py", line 36, in get_net
    return DetBenchTrain(net, config)
  File "/media/mcj/mcj/detection_mcj/network/Effdet/effdet/bench.py", line 78, in __init__
    anchors = Anchors(
  File "/media/mcj/mcj/detection_mcj/network/Effdet/effdet/anchors.py", line 259, in __init__
    self.register_buffer('boxes', self._generate_boxes())
  File "/media/mcj/mcj/detection_mcj/network/Effdet/effdet/anchors.py", line 267, in _generate_boxes
    boxes = _generate_anchor_boxes(self.image_size, self.anchor_scale, self.config)
  File "/media/mcj/mcj/detection_mcj/network/Effdet/effdet/anchors.py", line 141, in _generate_anchor_boxes
    if image_size % stride != 0:
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'

貌似因为opt.scale没有指定,然后我指定比如128,又会报size不匹配的错误。