machrisaa / tensorflow-vgg

VGG19 and VGG16 on Tensorflow
2.21k stars 1.08k forks source link

Odd classification results #4

Closed zimmerm closed 8 years ago

zimmerm commented 8 years ago

Hi,

i just cloned your rep and downloaded the *.npy files provided. I didn't change any file and run the test_vgg16.py example, which works but leads to odd classification results:

[...]
npy file loaded
[[  3.54046060e-05   6.26692083e-03   2.32575258e-04 ...,   1.31252409e-05
    4.17124102e-04   5.32930251e-03]
 [  2.74504941e-07   1.49452433e-04   5.41723421e-06 ...,   1.50292351e-06
    1.41892961e-04   7.05321319e-03]
 [  2.73421301e-05   2.04334548e-03   5.73722122e-04 ...,   1.37338357e-05
    5.19106514e-04   4.67342697e-03]]
('prob shape', (1000,))
('Top1: ', 'n04589890 window screen', 0.17731868)
('Top5: ', [('n04589890 window screen', 0.17731868), ('n03788365 mosquito net', 0.050591175), ('n03000134 chainlink fence', 0.038932227), ('n04476259 tray', 0.036342748), ('n03485794 handkerchief, hankie, hanky, hankey', 0.033405658)])
('prob shape', (1000,))
('Top1: ', 'n04209239 shower curtain', 0.3111819)
('Top5: ', [('n04209239 shower curtain', 0.3111819), ('n02971356 carton', 0.061327737), ('n04548280 wall clock', 0.036779501), ('n03131574 crib, cot', 0.032009162), ('n03291819 envelope', 0.031746123)])

Any thoughts on what might be the problem? I'm using tensorflow 0.8.0 and tensorflow-vgg16 actually works fine.

Thanks!

machrisaa commented 8 years ago

Hi Zimmerm, sorry for late reply. There was a bug reported in https://github.com/machrisaa/tensorflow-vgg/pull/3

It has been fixed and here is the result after fixed:

[[  2.38406561e-09   4.29311475e-09   8.45095216e-10 ...,   7.95107713e-09
    2.29003358e-08   1.97536032e-08]
 [  2.78826029e-08   4.09706814e-07   1.02887476e-08 ...,   1.14151540e-07
    6.34903756e-08   1.54330864e-05]]
('Top1: ', 'n02129604 tiger, Panthera tigris', 0.8269155)
('Top5: ', [('n02129604 tiger, Panthera tigris', 0.8269155), ('n02123159 tiger cat', 0.17136873), ('n02128925 jaguar, panther, Panthera onca, Felis onca', 0.0012765416), ('n02127052 lynx, catamount', 0.00017351769), ('n02128385 leopard, Panthera pardus', 0.00015544165)])
('Top1: ', 'n03598930 jigsaw puzzle', 0.99591404)
('Top5: ', [('n03598930 jigsaw puzzle', 0.99591404), ('n03291819 envelope', 0.00028725094), ('n03908618 pencil box, pencil case', 0.00022548562), ('n03188531 diaper, nappy, napkin', 0.00021818142), ('n04033995 quilt, comforter, comfort, puff', 0.00018459425)])