facebookarchive / tutorials

Caffe2 Tutorials
Apache License 2.0
123 stars 61 forks source link

Incorrect prediction from Shufflenet #21

Closed hcharaya closed 5 years ago

hcharaya commented 5 years ago

Hi I tried to run the tutorial using shufflenet however i am getting incorrect predictions on given images I am trying to run attached script after installing shufflenet checkpoint

shufflenet_code.txt

Got following results results shape: (1, 1, 1000) Prediction: 862 Confidence: 0.9999902 Raw top 5 results: [array([862.0, 0.9999902248382568], dtype=object), array([789.0, 3.7160550618864363e-06], dtype=object), array([879.0, 3.410564204386901e-06], dtype=object), array([852.0, 2.5731721962074516e-06], dtype=object), array([462.0, 3.151346371355057e-13], dtype=object)] Top 5 classes in order: [862, 789, 879, 852, 462] Batch Shape: (7, 3, 224, 224) NCHW image (ready to be used as input): (7, 3, 224, 224) Squeezed Predictions Shape, with batch size 7: (7, 1000) Results for: 'images/cowboy-hat.jpg' Prediction: 429 Confidence: 0.8792148 Results for: 'images/cell-tower.jpg' Prediction: 904 Confidence: 1.0 Results for: 'images/Ducreux.jpg' Prediction: 852 Confidence: 0.94463617 Results for: 'images/pretzel.jpg' Prediction: 402 Confidence: 1.0 Results for: 'images/orangutan.jpg' Prediction: 852 Confidence: 1.0 Results for: 'images/aircraft-carrier.jpg' Prediction: 852 Confidence: 0.9999987 Results for: 'images/cat.jpg' Prediction: 852 Confidence: 0.6261599

This script however works fine for squeezenet.

hcharaya commented 5 years ago

Problem is resolved as pre-processing was not configured with required normalize, mean and std.