Skip to content

AssertionError: Dimension conflict! in rf-pool-classifier #2

@beevor

Description

@beevor

I am attempting to run "Polygon Classification using Multispectral Imagery and Random Forests."
I am following the task on http://gbdxstories.digitalglobe.com/create-task/.
I am running the task through the docker container. I have the right inputs (1040010014800C00.tif and train.geojson)
On running `python rf-pool-classifier.py' (in the docker container) this is the traceback:

Traceback (most recent call last):
File "/rf-pool-classifier.py", line 70, in
task.invoke()
File "/rf-pool-classifier.py", line 54, in invoke
X.append(compute_features(raster))
File "/usr/local/lib/python2.7/dist-packages/mltools/features.py", line 68, in pool_basic
pool_data = spectral_angles(data, pool_sig)
File "/usr/local/lib/python2.7/dist-packages/mltools/features.py", line 23, in spectral_angles
assert members.shape[1] == data.shape[0], 'Dimension conflict!'

Inspection shows that "data" is train_rasters[0], data.shape = (3, 77, 61), data.shape[0] = 3.
Meanwhile, 'members' appears to be the pool spectral signature, members.shape = (1,8), hence the assertion error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions