Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FCN confusion matrix visualization fix #1536

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SlipknotTN
Copy link

Issue #1492.

To reproduce the bug:

  • Train a fully convolutional network (e.g SqueezeNet 1.1)
  • Run "classify many" with a list of images

Depending on the version of numpy you will get a warning or an error.

With numpy 1.11 you get this warning and the confusion matrix has all the results on the first column.

VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future
  result.append((labels[i], round(100.0 * scores[image_index, i], 2)))

With numpy 1.12 you get an error at the same line and no confusion matrix is shown.

The problem is the shape of "scores" that must be (number_of_images, number_of_classes), but with FCNs the shape has additional dimensions. e.g. SqueezeNet v1.1 final shape is (number_of_images, number_of_classes, 1, 1).

@SlipknotTN
Copy link
Author

SlipknotTN commented Mar 30, 2017

Added the same fix for "TOPN category". Without this fix topn returns an error about dimensions.

@tmatas
Copy link

tmatas commented May 30, 2017

Hi! I'm facing the same issue..any news about this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants