DigitalGlobe / mltools

A collection of Machine Learning Tools for object detection and classification on DG imagery.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssertionError: Dimension conflict! in rf-pool-classifier

beevor opened this issue · comments

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.