Skip to content

CustomClassifier doesn't handle channel-free models #5

@AlliedToasters

Description

@AlliedToasters

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions