WanFang13 / C-MIL

Code for C-MIL: Continuation Multiple Instance Learning for Weakly Supervised Object Detection
63 stars 14 forks source link

attempt to call field 'ME_LocalConsistencyFast' (a nil value) #2

Open drcege opened 5 years ago

drcege commented 5 years ago

I have successfully compiled all things. Dataset and model are also processed. During training, I got this error:

In 1 module of nn.ParallelTable:
In 2 module of nn.Sequential:
layers/ContinuationSubset.lua:42: attempt to call field 'ME_LocalConsistencyFast' (a nil value)
stack traceback:
        layers/ContinuationSubset.lua:42: in function 'compute_consistency_sorted'
        layers/ContinuationSubset.lua:141: in function 'ComputeIndsFast'
        layers/ContinuationSubset.lua:173: in function <layers/ContinuationSubset.lua:156>
        [C]: in function 'xpcall'
        ~/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ~/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function <~/torch/install/share/lua/5.1/nn/Sequential.lua:41>
        [C]: in function 'xpcall'
        ~/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ~/torch/install/share/lua/5.1/nn/ParallelTable.lua:12: in function <~/torch/install/share/lua/5.1/nn/ParallelTable.lua:10>
        [C]: in function 'xpcall'
        ~/torch/install/share/lua/5.1/nn/Container.lua:63: in function 'rethrowErrors'
        ~/torch/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward'
        fbnn_Optim.lua:146: in function 'optimize'
        train_cmil.lua:94: in main chunk
        [C]: in function 'dofile'
        ...torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
        [C]: at 0x00405d50

It works if I exchange the comment of these two lines: https://github.com/Winfrand/C-MIL/blob/410a66a70c131267093ed55762ad38ffe4740338/layers/ContinuationSubset.lua#L41-L42 So what's ME_LocalConsistencyFast about?

sab148 commented 5 years ago

Hi, Have you solved your problem ? Because I'm also trying to run this code and I'm struggling with the same issue.

drcege commented 5 years ago

@sab148 see the referenced code

sab148 commented 5 years ago

So I have just to put the second line in comment and change the comment of the first line that's it ?

drcege commented 5 years ago

yes

sab148 commented 5 years ago

can you please give me your email ? I have some question about this code if you can help me

Thank you so much

sab148 commented 5 years ago

Segmentation fault (core dumped) i got this when I did it

drcege commented 5 years ago

Sorry, I haven't done detection for a while. You should first successfully install all the dependencies and compile modules, then it will work.

sab148 commented 5 years ago

I installed all the dependencies ... i don't know it doesn't work Is this code worked for you ?

drcege commented 5 years ago

Yes, it works, although it's not very easy. Torch has been inactive for several years, thus there are some compatibility problems with new versions of packages and libraries (e.g., gcc, hdf5, matio, loadcaffe).

My suggestion is,

  1. follow exactly the official guidelines to install torch
  2. luarocks install each dependency one by one, and ensure each one is installed successfully

If any error happends, use google to solve it.

sab148 commented 5 years ago

Thank you so much for your advices Can you please give me your email i have questions about this code ?