kkanshul / hide-and-seek Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
Hi, I'm a novice on Torch7. I'm sorry for my confusion about how to get the prediction of an image. I wrote the following code:
-- ....
local modelCache = paths.concat('./cache', 'model_googlenet_has_32.t7')
local model = torch.load(modelCache)
model:evaluate()
model:cuda()
-- print(model)
for line in io.lines(paths.concat(DATA_ROOT, '../images_1-25000.txt')) do
line = split(line, " ")
local img = testHook({loadSize}, paths.concat(DATA_ROOT, line[1]))
if img:dim() == 3 then
img = img:view(1, img:size(1), img:size(2), img:size(3))
end
local predictions = model:forward(img:cuda())
local pred_idx, pred_sorted = predictions:sort(2, true)
print(line[1])
print(pred_sorted[1][1]-1)
end
Where 'testHook' is extracted from https://github.com/soumith/imagenet-multiGPU.torch. But I got hardly 0 top-1 accuracy on 'ILSVRC2012_img_val'. What's wrong with my code?
Looking forward to your reply :)
Hi, Krishna
Thank you for sharing the source cod for the awesome paper!
I was reading your paper to embed HaS into my pytorch model.
You mentioned the hidden pixel values are supposed to set to the mean of all the pixel values in the entire training. Does that mean I just need to change 0 to the mean of all the pixels at line 30 in hide_patch.py? (
Line 30 in 5e77ed4
For us to freely use the code.
What's the advantage of HaS over the random cropping that is commonly used for data augmentation?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.