See the reference implementation at http://fcn.berkeleyvision.org. This pre-release is deprecated.
-
-
Save shelhamer/91eece041c19ff8968ee to your computer and use it in GitHub Desktop.
same question here? an example for fully-convolutional forward & backward with ground truth segmentation would be great ?
@shelhamer What's your input format?How can I train your model using my own datas?
Are Database pascal-context-train-lmdb and pascal-context-test-lmdb available online?
@shelhamer I have run the 32 stride version and it works. But, when trying to run the 8 stride version I get this error when loading the model
net = caffe.Net('/fcn-8/deploy.prototxt', '/fcn-8/fcn-8s-pascal.caffemodel', caffe.TEST)
ERROR: Cannot copy param 0 weights from layer 'score-pool4'; shape mismatch. Source param shape is 21 512 1 1 (10752); target param shape is 60 512 1 1 (30720). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.
@aabobakr I think that .caffemodel
is trained using 21-class PASCAL VOC instead of 60-class PASCAL CONTEXT but the .prototxt
is used for the PASCAL CONTEXT, which causes the incompatibility.
@scstech @etienne87 @Linzert You may refer to FCN-32s.
First convolution layer padding is given as 100. Can anyone explain the reason for high padding values?
@abidrahmank
later layers do some crop, I think it is the reason why the pad be 100 in the first layer.
For example, pool5 layer is (512,22,22),and fc6 layer is (4096,16,16). So pool5 layer has been cropped.
If you don't use 100 pad , you won't get last layer.
Hi, I am trying to train fcn-8 on pascal-context dataset to replicate results but so far my loss doesn't seem to be decreasing. I have also tried finetuning from fcn-8-pascalcontext model, but my loss at iteration 0 is 1.7788e+06.
Considering that iteration 0 is just an evaluation of the model, shouldn't I get a much lower loss? Note that here I am not doing the net surgery step.
What is the functionality of crop Layer and Eltwise Fusion in this network?
Hi all, I now try to export the prediction from the FCN using C++ for my project. But I end up with some very strange images.
In my problem I tried to build my own fcn and there are only two classes to segment (0 and 1)
Here is my code to read the output of the forward pass:
////////////////////////////////////////////////////////////////
const vector<Blob>& result = caffe_net.Forward(bottom_vec, &iter_loss); // forward pass
const float result_vec = result[0]->cpu_data();
// generate prediction from the output vector and store it in Mat
cv::Mat srcC = cv::Mat::zeros(cv::Size(512,384), CV_32FC1);
int nl= srcC.rows;
int nc= srcC.cols;
for (int j=0; j<nl; j++) {
float* data= srcC.ptr(j);
for (int i=0; i<nc; i++) {
if (result_vec[i+j*nc+datum.height()*datum.width()] > result_vec[i+j_nc]);
// compare the value from different classes and generate the prediction
data[i] = 255;
}
}
//////////////////////////////////////////////////////////////////
The output of CNN is in format of const float_, but I don't know whether the data is arranged in c_h_w or w_h_c order for fcn, and due to the wired output Mat I got, I think maybe I did it in the wrong way. Can somebody help with this please?
@shelhamer I want to fine tune fcn8 on a different dataset for predicting flow magnitude map which is gray scale image by doing regression by changing the loss to euclidean and num_outputs of last layer to 1. is that right?
The loss is too high. basically for how many iterations should I set it in this case?
should I first do some changes in solver around your parameters or in this case I should decrease e.g. base_lr because now we are finetuning.
thanks a lot for your help
How I can put the data? How I can undesrtand the labels?