See the reference implementation at http://fcn.berkeleyvision.org. This pre-release is deprecated.
This comment has been minimized.
This comment has been minimized.
@weiliu89
|
This comment has been minimized.
This comment has been minimized.
@weiliu89 according to my notes this should be sufficient to reach 35.1 mean I/U in 80,000 iterations when fine-tuning from the VGG16 classifier weights. |
This comment has been minimized.
This comment has been minimized.
@whjxnyzh I merged @shelhamer's pull BVLC/caffe#2016, and it can save some memory. I was using k40 and it has enough memory. But it helped me when I was dealing with 1500x1500 images. @shelhamer I used the same protocol as described by your notes, but cannot get the same number when I finetune from VGG16. 1.7 (35.1 - 33.4) mean IoU difference is huge in my opinion. Not sure if I miss some details or not. However, I did use the model provided by you guys and verify that it indeed achieves 35.1 mean IoU on the validation set of the pascal-context dataset. I also tried to finetune upto 160000 iterations and it catches up to 35.1 mean IoU.. |
This comment has been minimized.
This comment has been minimized.
@whjxnyzh i have the same problem.. |
This comment has been minimized.
This comment has been minimized.
@whjxnyzh @likaidlut My Loss doesn't decrease that quick and can end up with more or less similar results as reported. Did you merge all the necessary pulls (as shown at https://github.com/longjon/caffe/blob/future/future.sh) to do the training? Especially the accum_gradient pull #1977 |
This comment has been minimized.
This comment has been minimized.
How to make 'pascal-context-val-gt59-lmdb'?? |
This comment has been minimized.
This comment has been minimized.
@shelhamer @weiliu89 what's the loss look like.... my loss is always about 10000....is this too big? |
This comment has been minimized.
This comment has been minimized.
@whjxnyzh My loss look like the following using the exact solver provided by the author. 10000 is not too big, because it doesn't normalize the softmax loss by default I0406 11:30:43.457891 23294 solver.cpp:248] Learning Rate Policy: fixed I0407 03:56:52.927431 23294 solver.cpp:214] Iteration 79900, loss = 59123.9 |
This comment has been minimized.
This comment has been minimized.
@weiliu My loss after 80000 iterations remains at around 600000 and is not around the 60000 that you are reporting. How did you make the lmdb for the input? I converted the pascal-context dataset to have 0 as background class and 1-59 as the numbers for the other classes. |
This comment has been minimized.
This comment has been minimized.
@KimHoon Same question.. did you figure it out? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@debadeepta Have you figure out why ? I got similar convergence value, around 650000. |
This comment has been minimized.
This comment has been minimized.
Same here. Also made sure to cluster all the classes outside of the 59 set to zero (background). Note that classes 1,2,3,... in the 59 set are not necessarily 1,2,3,... in the full set. You need to map them so you end up with indices in the [0, 59] range. Still getting > 666790 loss with fluctuations that never seem to go below 440K. I tried describing my procedure in this post. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@irri please see my answer at stackoverflow |
This comment has been minimized.
This comment has been minimized.
how can I convert JPEG images to data which caffe can process? I use convert_imageset in caffe/tools, but it need a a list of images as well as their labels(an integer). But in FCN-32s the labels are images. |
This comment has been minimized.
This comment has been minimized.
@Eniac-Xie: you can use a function like this - https://gist.github.com/arunmallya/9b67faf63405389afb83, to load CSV data (segmentation labels) into a datum and then store it in an LMDB database. |
This comment has been minimized.
This comment has been minimized.
My dataset has 2 classes; with 1000 training images of (5,256,256) also corresponding ground truth data (1,256,256) which is a binary image either 0 or 1 to represent the 2 classes. When training in solve.py you use the existing caffemodel which I assume is 3-channel ; but as I want to implement in on my 5 channel dataset can I use the same model provided ? |
This comment has been minimized.
This comment has been minimized.
I have just tried to run the
which says that the BTW, I use the required |
This comment has been minimized.
This comment has been minimized.
@Jianchao-ICT update your ld_library_path and python_path to point to new caffe-future branch which has the crop layer |
This comment has been minimized.
This comment has been minimized.
Hello anyone, I execute
So I have to increase the limit and recompile the protobuf now? Is there any better solution? Thank you! |
This comment has been minimized.
This comment has been minimized.
I have to use a quick and dirty approach to hack the I will try to limit the sizes of the big messages now. |
This comment has been minimized.
This comment has been minimized.
Could anybody explain what the 'Crop' layer is for? |
This comment has been minimized.
This comment has been minimized.
What is the train/val split on the PASCAL Context data that is needed to get the 35.1 mean I/U? There is a train.txt and val.txt in the VOC2010/ImageSets/Segmentation folder of the PASCAL VOC 2010 download, but these only have 964 images in each. The Long et al. paper seems to use half of the 10,103 images available for training and the other half for testing. So, I don't think these are the correct files. The PASCAL Context Dataset download also doesn't have any files for the train/val split. |
This comment has been minimized.
This comment has been minimized.
I was able to get a mean 53.5% accuracy after 10150 iteration with a loss of 67968. This was with a 50/50 random split for train vs test. The accuracy was determined by adding an 'accuracy' layer to train_val.prototxt. How is the mean I/U determined? Is there a similar layer that can be added? |
This comment has been minimized.
This comment has been minimized.
Why the learning rate is so small, can anyone explain it,plz? |
This comment has been minimized.
This comment has been minimized.
Which should I use to train my own data,the solver.py or the solver.prototxt? I used the solver.prototxt to train my data,but the loss didn't decrease. Dose anyone have a solution? Thanks |
This comment has been minimized.
This comment has been minimized.
Hi, anyone know where to download "vgg16fc.caffemodel" in the solver.py? |
This comment has been minimized.
This comment has been minimized.
I would like to share my script for creating a custom data set in lmdb format. It would be very appreciated if you could let me know when you find any bug on this code. #!/usr/bin/python
import caffe
import glob
import lmdb
import numpy as np
from PIL import Image
import os
import sys
# Variables
img_width = 500
img_height = 500
# Paths
# PNG images
color_dir = './input/color_image_dir'
# PNG images
# Per-pixel labels are stored in a gray image
label_dir = './input/label_image_dir'
output_dir = './lmdb/'
inputs = glob.glob(color_dir + '/*.png')
color_lmdb_name = output_dir + '/color-lmdb'
if not os.path.isdir(color_lmdb_name):
os.makedirs(color_lmdb_name)
color_in_db = lmdb.open(color_lmdb_name, map_size=int(1e12))
label_lmdb_name = output_dir + '/label-lmdb'
if not os.path.isdir(label_lmdb_name):
os.makedirs(label_lmdb_name)
label_in_db = lmdb.open(label_lmdb_name, map_size=int(1e12))
num_images = 0;
color_mean_color = np.zeros((3))
with color_in_db.begin(write=True) as color_in_txn:
with label_in_db.begin(write=True) as label_in_txn:
for in_idx, in_ in enumerate(inputs):
img_name = os.path.splitext( os.path.basename(in_))[0]
color_filename = color_dir + img_name + '.png'
label_filename = label_dir + img_name + '.png'
print(str(in_idx + 1) + ' / ' + str(len(inputs)))
# load image
im = np.array(Image.open(color_filename)) # or load whatever ndarray you need
assert im.dtype == np.uint8
# RGB to BGR
im = im[:,:,::-1]
# in Channel x Height x Width order (switch from H x W x C)
im = im.transpose((2,0,1))
# compute mean color image
for i in range(3):
color_mean_color[i] += im[i,:,:].mean()
num_images += 1
#color_im_dat = caffe.io.array_to_datum(im)
color_im_dat = caffe.proto.caffe_pb2.Datum()
color_im_dat.channels, color_im_dat.height, color_im_dat.width = im.shape
assert color_im_dat.height == img_height
assert color_im_dat.width == img_width
color_im_dat.data = im.tostring()
color_in_txn.put('{:0>12d}'.format(in_idx), color_im_dat.SerializeToString())
im = np.array(Image.open(label_filename)) # or load whatever ndarray you need
assert im.dtype == np.uint8
label_im_dat = caffe.proto.caffe_pb2.Datum()
label_im_dat.channels = 1
label_im_dat.height, label_im_dat.width = im.shape
assert label_im_dat.height == img_height
assert label_im_dat.width == img_width
label_im_dat.data = im.tostring()
label_in_txn.put('{:0>12d}'.format(in_idx), label_im_dat.SerializeToString())
label_in_db.close()
color_in_db.close()
color_mean_color /= num_images
np.savetxt(output_dir + '/{}.csv'.format('color-mean'), color_mean_color, delimiter=",", fmt='%.4f') |
This comment has been minimized.
This comment has been minimized.
pad: 100 in conv1_1 layer is wrong.. |
This comment has been minimized.
This comment has been minimized.
When I tried to run deploy.prototxt, it takes very large memory, and the process crash on CPU. Thanks in advance. |
This comment has been minimized.
This comment has been minimized.
Hi guys, |
This comment has been minimized.
This comment has been minimized.
Can I fine-tune this model for high-resolution image classification? The input sizes of Alexnet/Caffenet/GoogleLenet are too small for my application. |
This comment has been minimized.
This comment has been minimized.
@weiliu89 Hi, I encountered conflicts when I merged PR #2016 , it says "Automatic merge failed". What should I do next? Thank you in advance. |
This comment has been minimized.
This comment has been minimized.
Hi, I tried to use deconv layer with group and bilinear as upsampling instead of using the solver script, but could hardly reproduce the result. Anybody knows the reason? |
This comment has been minimized.
This comment has been minimized.
@acgtyrant I installed the protobuf using the command given in google tensorflow website However, once I uninstalled that and tried to compile using the github source code from google protobuf, python can't find the google protobuf at all. Can you help me finding a way here? Thanks in advance |
This comment has been minimized.
This comment has been minimized.
@yjc04 |
This comment has been minimized.
This comment has been minimized.
Hello all, Have anyone try to export prediction image using C++, instead of python? I am not the family of python code. Thank all |
This comment has been minimized.
This comment has been minimized.
any c++ for classification or Segmentation would be great. |
This comment has been minimized.
This comment has been minimized.
Hi, |
This comment has been minimized.
I can only achieve 33.40 mean I/U after 80000 iterations. I used the 4998 training images to train and 5015 to test. I can get to 35.0 after 160000 iterations though. I am not sure if there is other details I need to notice to get same 35.1 for only 80000 iterations?