YonghaoHe / LFFD-A-Light-and-Fast-Face-Detector-for-Edge-Devices

A light and fast one class detection framework for edge devices. We provide face detector, head detector, pedestrian detector, vehicle detector......
MIT License
1.31k stars 329 forks source link

Error in operator conv11_loss_score #85

Closed bhavitvyamalik closed 4 years ago

bhavitvyamalik commented 4 years ago

I was fine tuning LFFD on my custom dataset for pedestrians where my input shape was (640,480). After logging parameters training script gave the following error:

2020-05-26 11:52:08,650[INFO]: -----------------------------------------------------------------------------------
infer_shape error. Arguments:
Traceback (most recent call last):
  File "config_farm/configuration_30_320_20L_4scales_v1.py", line 312, in <module>
    run()
  File "config_farm/configuration_30_320_20L_4scales_v1.py", line 308, in run
    start_index=param_start_index)
  File "/home/nagarro/work/curved_text_detection/send/A-Light-and-Fast-Face-Detector-for-Edge-Devices/ChasingTrainFramework_GeneralOneClassDetection/train_GOCD.py", line 60, in start_train
    solver.fit()
  File "/home/nagarro/work/curved_text_detection/send/A-Light-and-Fast-Face-Detector-for-Edge-Devices/ChasingTrainFramework_GeneralOneClassDetection/solver_GOCD.py", line 90, in fit
    self.__init_module()
  File "/home/nagarro/work/curved_text_detection/send/A-Light-and-Fast-Face-Detector-for-Edge-Devices/ChasingTrainFramework_GeneralOneClassDetection/solver_GOCD.py", line 63, in __init_module
    arg_shapes, _, __ = self.net_symbol.infer_shape()
  File "/usr/local/lib/python3.6/dist-packages/mxnet/symbol/symbol.py", line 1103, in infer_shape
    res = self._infer_shape_impl(False, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/mxnet/symbol/symbol.py", line 1267, in _infer_shape_impl
    ctypes.byref(complete)))
  File "/usr/local/lib/python3.6/dist-packages/mxnet/base.py", line 255, in check_call
    raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: Error in operator conv11_loss_score: Shape inconsistent, Provided = [16,2,59,59], inferred shape=[16,2,59,79]

Also, did you train on (640,480) or (480,480) because your training script had (480,480) by default but pickle files were of dimensions (640,480).