I have encountered this problem.
Python 3.5.4 |Anaconda custom (64-bit)| (default, Aug 14 2017, 13:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Traceback (most recent call last):
File "e:\ImageAI-master\examples\object_detection.py", line 13, in
detector.loadModel()
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection_init_.py", line 121, in loadModel
model = resnet50_retinanet(num_classes=80)
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\resnet.py", line 86, in resnet50_retinanet
return resnet_retinanet(num_classes=num_classes, backbone='resnet50', inputs=inputs, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\resnet.py", line 80, in resnet_retinanet
model = retinanet.retinanet_bbox(inputs=inputs, num_classes=num_classes, backbone=resnet, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\retinanet.py", line 347, in retinanet_bbox
model = retinanet(inputs=inputs, num_classes=num_classes, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\retinanet.py", line 302, in retinanet
submodels = default_submodels(num_classes, anchor_parameters)
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\retinanet.py", line 210, in default_submodels
('regression', default_regression_model(anchor_parameters.num_anchors())),
File "C:\ProgramData\Anaconda3\lib\site-packages\imageai\Detection\keras_retinanet\models\retinanet.py", line 125, in default_regression_model
outputs = keras.layers.Reshape((-1, 4), name='pyramid_regression_reshape')(outputs)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\engine\topology.py", line 602, in call
output = self.call(inputs, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 391, in call
target_shape = self.compute_output_shape(input_shape)[1:]
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 376, in compute_output_shape
input_shape[1:], self.target_shape)
File "C:\ProgramData\Anaconda3\lib\site-packages\keras\layers\core.py", line 364, in _fix_unknown_dimension
original = np.prod(input_shape, dtype=int)
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core\fromnumeric.py", line 2518, in prod
out=out, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\core_methods.py", line 35, in _prod
return umr_prod(a, axis, dtype, out, keepdims)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'