Comments (7)
short answer: no.
Your VGG_ILSVRC_16_layers_FCNN is for deployment. It does not require a data layers. You insert the your images into the data blob directly. This notebook example shows how to feed data into a network using a deploy.prototxt. Note that you cannot use a deploy.prototxt to train a network.
As for train_val.prototxt, it needs t know where all of the data is. This is why we need to define a data layer and describe its format (e.g. backend: LMDB), location (e.g. source: "/path/to/lmdb")
from nideep.
hello kashef,
sorry for the late reply.I guess whatever i am doing so far seems correct as there is no need of fc8 and input layers weights to be copied.At present in the training at 20th iteration the loss is reduced to 635278.It is stuck at testing for long time.I am trying to figure it out.I have two more doubts,
1)As mentioned in the notebook you provided,we give directly the image to deploy.prototxt and do the necessary preprocessing bcz of matplotlib in ipython way of loading the image.My doubt is can I just convert all the test images(not the validation)say some 100 to LMDB and run the same train_val.protoxt as it contains "Include Phase" term for test.If not can I give the LMDB to deploy.protoxt?
2)Can I use your pascal2lmdb.py code to generate lmdb's for say just 5 classes by modifiying the "59_labels.txt" file?Because when I tried it I feel I am still getting all the class names or images,as the size of the lmdb files are the same as before.
from nideep.
re-1) Both options are effectively the same. If you have 100 images in a test set outside of the validation set, you can evaluate the network on them either by (A) saving them into an lmdb and redirecting the trainval.prototxt in the test phase to that lmdb OR (B) feed them into the deploy.prototxt. In either case you need to verify you're loading the correct set of finalized weights.
re-2) You can modify "59_labels.txt" to reduce the classification to a smaller subset. This will not change the size of the lmdb, since it will still store a value for every single pixel. I recommend spending some time verifying the the binning was correct (e.g. the 5 classes you are interested in were mapped correctly to the [1,5] range and everything else was binnned to class "0".
from nideep.
Thanks kashef,i will check that out and get back in 2 days.
from nideep.
Hello Kashef,
When I train FCN 32s for my own dataset ,i get the following error ,
(2 vs 3)
invalid crop parameters in dimension: 1
It points to line number 69 here
This is happening at the crop layer.I cant understand this error.I resized all input images to 500x500(3 channel ) and labels are in 1xHxW and only two classes with 0 as background and 255 as foreground.In this dataset the object(foreground,a document image) may sometimes occupy the fully image,meaning there may not be a background.The object size differs very much but it is the same document image.
When will such an error occur.I cannot understand the use of crop layer after deconvolution layer,as well.
from nideep.
@srika91, may not be related to the cropping error, but if you only have two classes, and your final layer produces num_output: 2, you're better off setting the non-zero class to 1 instead of 255.
Can you post the definition of the crop layer in your trainval.prototxt. Only the crop layer please, not easy to read if you paste the entire network definition.
from nideep.
Hello kashef,
crop layer is ,
layer { type: 'Crop' name: 'score' top: 'score'
bottom: 'upscore' bottom: 'data' }
layer { type: 'SoftmaxWithLoss' name: 'loss' top: 'loss'
bottom: 'score' bottom: 'label'
loss_param { normalize: false }
}
Between I posted this in caffe google groups.You could see it here .But still I would like to try by modifying 0 as 1 before trying the new shelhamer repo for fcns
from nideep.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nideep.