svhn configuration variables

192 views
Skip to first unread message

edk

unread,
Nov 3, 2013, 11:56:42 AM11/3/13
to ebl...@googlegroups.com
I am trying to programatically do a detection for SVHN. After some debugging, I was able to ensure that it indeed works for face detection. 

So I believe the trouble I am experiencing is pertaining to the configuration file perhaps? 

The configuration I used is svhn-trained.conf and appended the following at the end of file:

tblroot=/Users/edk/eblearn/demos/svhn
classes = /Users/edk/eblearn/demos/svhn/svhn/svhn_ynuv7_train_classes.mat

I attached a copy of the configuration file I am using. 

When I run it, I get the following output regarding a "deep copy not implemented in l4pool22+ebm_1, in copy at /Users/edk/Documents/dev_mac/TestProject/TestProject/ebl_core/libeblearn/include/ebl_module.hpp:272"

Trace:

detection thread: Found merging module(s) in network: [ 0x101a0e9d0 ]

flat_merge module merge2, merging 2 inputs:  (in 4x4 stride 1x1 scale 1x1),  (in 4x4 stride 1x1 scale 1x1), 

[1;31mError:[0m deep copy not implemented in l4pool22+ebm_1, in copy at /Users/edk/Documents/dev_mac/TestProject/TestProject/ebl_core/libeblearn/include/ebl_module.hpp:272

[1;31mStack:[0m

0   TestProject                         0x00000001001c9982 _ZN3ebl10module_1_1IfE4copyEPNS_9parameterIfEE + 370

1   TestProject                         0x00000001001c15fd _ZN3ebl11arch_narrowIfNS_17flat_merge_moduleIfEEEEPNS_10module_1_1IT_EES6_PT0_bbPb + 717

2   TestProject                         0x00000001001c423d _ZN3ebl11arch_narrowIfNS_17flat_merge_moduleIfEEEEPNS_6layersIT_EES6_PT0_bbPb + 301

3   TestProject                         0x00000001001c14d5 _ZN3ebl11arch_narrowIfNS_17flat_merge_moduleIfEEEEPNS_10module_1_1IT_EES6_PT0_bbPb + 421

4   TestProject                         0x00000001001be22d _ZN3ebl8detectorIfE22update_merge_alignmentEv + 941

5   TestProject                         0x00000001001bcc64 _ZN3ebl8detectorIfEC2ERNS_10module_1_1IfEERNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEEPNS_13answer_moduleIfffEEPNS_15resizepp_moduleIfEEPKcRNS5_13basic_ostreamIcS9_EESQ_b + 6116

6   TestProject                         0x000000010016b3c3 _ZN3ebl8detectorIfEC1ERNS_10module_1_1IfEERNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEEPNS_13answer_moduleIfffEEPNS_15resizepp_moduleIfEEPKcRNS5_13basic_ostreamIcS9_EESQ_b + 115

7   TestProject                         0x0000000100160c6e _ZN3ebl16detection_threadIfE7executeEv + 2654

8   TestProject                         0x00000001000eaea6 _ZN3ebl6thread3runEv + 22

9   TestProject                         0x00000001000eae6d _ZN3ebl6thread10entrypointEPv + 29

(lldb) 




Thank you for your help in advance.
svhn_trained_edk.conf

edk

unread,
Nov 5, 2013, 12:49:25 AM11/5/13
to ebl...@googlegroups.com
In addition, I have also added the weights variable to the configuration. 

classes=/Users/edk/eblearn/demos/svhn/svhn/svhn_ynuv7_train_classes.mat
weights=${tblroot}/svhn_l4_820.mat

Which leads to the following error, a mismatch in matrix size. 

Loading weights from: [ /Users/edk/eblearn/demos/svhn/svhn_l4_820.mat ]

Concatenated 1 matrices into 1: 258326 from [ /Users/edk/eblearn/demos/svhn/svhn_l4_820.mat ]

[1;31mError:[0m Trying to load a network with 258326 parameters into a network with 427516 parameters, in load_x at /Users/edk/Documents/dev_mac/TestProject/TestProject/ebl_core/libeblearn/include/ebl_parameters.hpp:130

[1;31mStack:[0m

0   TestProject                         0x00000001001f66c0 _ZN3ebl9parameterIfE6load_xERNS_3idxIfEE + 544

1   TestProject                         0x0000000100169f02 _ZN3ebl9parameterIfE6load_xERNSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEE + 2818

2   TestProject                         0x00000001001605bf _ZN3ebl16detection_threadIfE7executeEv + 831

3   TestProject                         0x00000001000eadb6 _ZN3ebl6thread3runEv + 22

4   TestProject                         0x00000001000ead7d _ZN3ebl6thread10entrypointEPv + 29

5   libsystem_pthread.dylib             0x00007fff8d809899 _pthread_body + 138

6   libsystem_pthread.dylib             0x00007fff8d80972a _pthread_struct_init + 0

7   libsystem_pthread.dylib             0x00007fff8d80dfc9 thread_start + 13

(lldb) 

the_minion

unread,
Nov 12, 2013, 9:00:47 AM11/12/13
to ebl...@googlegroups.com
Hey there,

Sorry for the late reply.

The ebm modules are only for training, they are a kind of a regularizer.

So, if you are using the svhn conf for detection, remove those modules from your configuration while doing detection.
--
S

the_minion

unread,
Nov 12, 2013, 9:02:44 AM11/12/13
to ebl...@googlegroups.com
So, during detection, 
change the line
penalty=${penalty${l1}}
to 
penalty=

You should be all set.

edk

unread,
Nov 12, 2013, 9:29:29 AM11/12/13
to ebl...@googlegroups.com
Hi S, 

I think I've tried that but I will give it a shot again when I get a chance. 

Thank you again. 
Ed

zhihong...@gmail.com

unread,
Dec 2, 2013, 12:43:37 PM12/2/13
to ebl...@googlegroups.com
Hi the_minion,

I have the related problem on svhn.

1) I successfully train svhned to get net00478.mat by using svhn_train.conf.
2) For detection, I made the changes that you mentioned in svhn.conf, i.e.,
change penalty, delete modules of important train parameters and training data
3) add the following lines, recommended by http://eblearn.cs.nyu.edu:21991/doku.php?id=detect

# detection
classes = svhn/svhn_ynuv7_train_classes.mat # names and # of classes
scaling_type = 4 # 4: no multi-scaling, just original 28x28 image
camera = directory # input images come from a directory
weights = net00478.mat

# change arch and add pre-process module
arch= resizepp0, ${features},${classifier}
resizepp0_pp = rgb_to_ynuv0
rgb_to_ynuv0_kernel = 7x7
rgb_to_ynuv0_global_norm = 0

Then I run detect svhn.conf image_directory (32x32 RGB images). I got the following errors:
arch 1: unknown module type conv
Error: failed to load module conv051, in create_network at /home/zhihong/dev/source/eblearn/tools/libeblearntools/include/netconf.hpp:131
Stack:
detect(_ZN3ebl14create_networkIfEEPNS_10module_1_1IT_EERNS_9parameterIS2_EERNS_13configurationERliPKciPSt3mapISsS4_St4lessISsESaISt4pairIKSsS4_EEESL_b+0x2df)[0x5b41ef]
detect(_ZN3ebl16detection_threadIfE7executeEv+0x212)[0x5bfa72]
/home/zhihong/dev/source/eblearn/bin/libeblearntools.so(_ZN3ebl6thread10entrypointEPv+0x9)[0x7f3d8d250ff9]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7f8e)[0x7f3d8b7c2f8e]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f3d8a804a0d]
Aborted (core dumped)

Any comments would be appreciated.


On Tuesday, November 12, 2013 9:02:44 AM UTC-5, the_minion wrote:
> So, during detection, 
> change the line
> penalty=${penalty${l1}}to penalty=You should be all set.

zhihong...@gmail.com

unread,
Dec 3, 2013, 4:23:47 PM12/3/13
to ebl...@googlegroups.com, zhihong...@gmail.com
I fixed this problem by deleting the space in

arch =resizepp0,${features},${classifier}

But I still got crash (without details of problem) by running
detect svhn.conf image_directory #(32x32 RGB images).

I am wondering whether someone can add detect demo (e.g., detect svhn_detect.conf imagefile) in the svhn tutorial
http://eblearn.cs.nyu.edu:21991/doku.php?id=svhn_tutorial

Thanks

eleanor....@gmail.com

unread,
Feb 7, 2016, 11:14:53 AM2/7/16
to eblearn, zhihong...@gmail.com
I am having a similar problem--my network parameters are mismatched. Could you possibly provide the new conf file you used? I have deleted all the training portions of my code, though I'm experiencing the same issue.
Reply all
Reply to author
Forward
0 new messages