bernard24 / ris Goto Github PK
View Code? Open in Web Editor NEWImplementation of the approach described in the paper "Recurrent Instance Segmentation" https://arxiv.org/abs/1511.08250.
License: MIT License
Implementation of the approach described in the paper "Recurrent Instance Segmentation" https://arxiv.org/abs/1511.08250.
License: MIT License
a_conv = nn.SpatialConvolution( n_channels, n_channels, kernel_size, kernel_size, kernel_stride, kernel_stride, math.ceil((factor-1)/2) )
With the usuaI function nn.SpatialConvolution , I could not see how the size of input can get factor times lager. Please tell me where I am wrong.
How to implement crf-rnn in torch so it can be integrated in RIS model?
https://github.com/torrvision/caffe/blob/e7f25fa2bdbb291a067930d60f337d305c128583/src/caffe/layers/multi_stage_meanfield.cpp
In the function plants_utils.create_instance the code seems to return 2 values , the input image and the gt_tensor , but I carefully review the code and I can only find gt_tensor in the code in 5 places below in the figure :
It seems that the value gt_image carries the annotation information and the gt_tensor seems like a nil value , but why you return the gt_tensor? Or have I understood something wrong?
I am trying to apply this method to detect other objects, however, even there is only one training sample without augmentation operation, this framework is hard to convergence? Is it normal? I follow the training method for people segmentation, and only train the 8-2 and lstm model.
How to implement inference?
When training for plants I am getting an error on the following line.
./plants_utils.lua:93: in function 'create_instance'
I have downloaded the data and dropped in the proper folders. Created the following files.
list_filename = input_path .. 'data_list.txt'
labels_filename = gt_path .. 'label_list.txt'
What are the steps to training?
When I run the launcher.sh in people_learning folder, showing that "module 'IoU3Criterion' not found".
There may be some files missing ?
hi @bernard24
2 quick questions
1- do you have a pretrained model for the leaf segmentation problem that I can experiment with? I am training RIS on my own dataset but it is very slow and RAM hungry. See below for my training config.
2- I am not using curriculum learning (and learning directly on 20 seq), since my test images have potentially many many leaves. Could I run a NxN sliding window over my original large image with potentially many plants and give the window image as input to the trained RIS?
cmd:option('-seq_length', 20, 'Maximum number of RNN iterations at training stage')
cmd:option('-lambda', 1, 'Hyperparameter pondering the classification accuracy term.')
cmd:option('-pass_output', 0, 'Pass previous output as input')
cmd:option('-non_object_iterations', 1, 'Number of iterations over the number of objects apearing in an image')
cmd:option('-height', 530, 'Height of the resized images')
cmd:option('-width', 500, 'Width of the resized images')
cmd:option('-learn_pre', 0, 'Whether learning Pre-CNN model')
cmd:option('-learn_cnn', 1, 'Whether learning CNN model')
cmd:option('-learn_lstm', 1, 'Whether learning LSTM model')
cmd:option('-learn_post_lstm', 1, 'Whether learning post-LSTM model')
cmd:option('-learning_rate', 10^-4, 'Learning rate')
cmd:option('-data_dir', '/scratch/.../plant/train/', 'Data directory')
cmd:option('-rnn_channels', 30, 'Number of channels of the rnn state')
cmd:option('-rnn_layers', 2, 'Number of layers of the rnn')
cmd:option('-rnn_filter_size', 3, 'Size of the filter of the rnn')
cmd:option('-cnn_filter_size', 3, 'Size of the filter of the cnn')
cmd:option('-it', 1000, 'Training iterations')
best
Peyman
How to train a model using recurrent networks on my own dataset?
I have prepared the data (more than 20000 images including the source image and annotation image )and modified the path, and run launcher.sh , but got this error: (
/home/jcc/torch/install/bin/luajit: /home/jcc/torch/install/share/lua/5.1/image/: No such file or directory/img_10_10.png
stack traceback:
[C]: in function 'error'
/home/jcc/torch/install/share/lua/5.1/image/init.lua:352: in function 'load'
./plants_utils.lua:42: in function 'create_instance'
experiment.lua:243: in main chunk
[C]: in function 'dofile'
.../jcc/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
I have set the image data file path to '../Data/Train/' in experiment.lua , why Torch seems to ignore '../Data/Train' itself and report this bug?
And if I used absolute path, like '/home/jcc/code/RIS-master/Data/Train/', Torch seems to ignore '/home/jcc/cod' and the error is like this
/home/jcc/torch/install/bin/luajit: /home/jcc/torch/install/share/lua/5.1/image/: No such file or directorye/RIS-master/Data/Train/img_10_10.png
stack traceback:
[C]: in function 'error'
/home/jcc/torch/install/share/lua/5.1/image/init.lua:352: in function 'load'
./plants_utils.lua:42: in function 'create_instance'
experiment.lua:243: in main chunk
[C]: in function 'dofile'
.../jcc/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670
So weird !
How to perform leaf segmentation on the cvppp dataset after I finished training?(part of the training log:
Besides, if I directly use the weird output of the fcn, there is error in this line:
lst = protos.rnn:forward{x, unpack(rnn_state[t-1])}
the error reads like this:
...~torch/install/share/lua/5.1/nn/CAddTable.lua:16: bad argument #2 to 'add' (sizes do not match at /tmp/luarocks_cutorch-scm-1-4319/cutorch/lib/THC/generated/../generic/THCTensorMathPointwise.cu:198)
stack traceback:
[C]: in function 'add'
........
The inference code I use is here
leaf_seg_infer.txt
Could you please give some advice? Or give a demo for inference the leaf segmentation?
Thanks a lot!
I downloaded the mentioned plants phenotyping datasets but the folder structure inside is different. In your script you use by default a folder called /Data/LSCData/A1/ . Where can I get the data you used as a compressed file?
Hi @bernard24
As mentioned in issue #5 , in order to run infer_example.lua I have to find a trained model to do the inference with. This brings up several confusions:
I'm not too sure how this script should be altered or how it should be reading in models or even which models.
Please let me know if you'd like more detailed error stack traces.
Also, excuse me - I am very new to Torch & Lua.
Thank you!
I used my own dataset and it has more than 11000 training images. I directly use the plant_training code, training from scratch, but the training did not seem to converge. And at the beginning the training seemed weird too:
So is it caused by the batch_size? Should I change batch_size from 1 to 32 or more? Could you please give some advice?
Besides,
1.--- In your paper you said you use one image for each batch in leaf segmentation experiments , so how to change the batch-size? Do I need to modify MatchCriterion.lua to adapt to mini-batch mode?
2.---what is the batch_size for your coco dataset experiments?
Inference for plants trained.
Sometimes there are more than 1 instance in a specific step of lstm, what might be a solution to this problem? What might be the reason and what might be a solution(modify the model) ?
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.