PyCDA icon indicating copy to clipboard operation
PyCDA copied to clipboard

CustomClassifier doesn't handle channel-free models

Open AlliedToasters opened this issue 3 years ago • 0 comments

An issue was brought to my attention that appears to be related to custom classifier models that do not expect color channels in input images. A test case has been added in the branch custom_classifier that reproduces this issue with the following traceback:

E

.

......
======================================================================
ERROR: test_custom_classifier (__main__.TestImageFlow)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/mklear/PyCDA/test.py", line 125, in test_custom_classifier
    cls = CustomClassifier('./pycda/models/no_channels_model.h5', crater_pixels=6)
  File "/Users/mklear/PyCDA/pycda/classifiers.py", line 66, in __init__
    self.input_channels = input_layer.input_shape[3]
IndexError: tuple index out of range

----------------------------------------------------------------------
Ran 11 tests in 3.570s

FAILED (errors=1)

I am currently working to solve this issue.

AlliedToasters avatar Aug 15 '20 23:08 AlliedToasters