Detect crashes

268 views
Skip to first unread message

vali...@gmail.com

unread,
Mar 29, 2013, 2:43:01 AM3/29/13
to ebl...@googlegroups.com
Hello EBLearn developers,

I use Windows binaries of EBlearn library installed from file eblearn-1.2_x86-r2631-win32.exe on Windows Vista. I try to build image classification system very similar to MNIST demo using tutorials from library website.

1. I prepared grey png images of size 32x32, and compiled train and validation sets using ‘dscompile’ tool.
2. I created conf file for ‘train’ tool simply coping code snippets from the page http://eblearn.cs.nyu.edu:21991/doku.php?id=beginner_tutorial2_train and then modified paths to point them to my dataset.
3. Convnet was successfully trained, and I received mat file of network weights.
4. To use ‘detect’ I created directory and placed several images in it. I added lines to conf file, which point to this image directory, and to mat of file of network weights, and to mat file of classes. When I run ‘detect’, Windows system closes it. ‘Detect’ does not print any error. Last line from ‘detect’ are printed below.

Could you guide me how to find what is wrong and how to fix it?

############ detect output BEGIN ######################

Creating a network with 2 outputs and 22 modules (input thickness is -1): conv0,addc0,tanh,abs0,wstd0,l2pool1,addc1,tanh,conv2,addc2,tanh,abs2,wstd2,l2pool3,addc3,tanh,conv5,addc5,
anh,linear7,addc7,tanh
arch 0: Using a full table for conv0_table: 1 -> 6 (6x2)
Added convolution module conv0 with 6 kernels with size 5x5, stride 1x1 and table 6x2 (1->6) (#params 150, thickness 6)
arch 1: Added bias module addc0 with 6 biases (#params 156, thickness 6)
arch 2: Added tanh module tanh with linear coefficient 0 (#params 156, thickness 6)
arch 3: Added abs (#params 156, thickness 6)
arch 4: Added contrast_norm module with subtractive_norm module with fixed mean weighting and kernel (x:(6x5x5 min 0.000901989 max 0.0221281),dx:,ddx:), across features, not using
lobal normalization, and same convolution and divisive_norm module wstd0_divnorm with kernel 5x5, using zero padding, across features, using fixed filter (5x5 min 0.00541193 max 0.
32768) (#params 156, thickness 6)
arch 5: Added lppooling module l2pool1 with thickness 6, kernel 2x2 ,stride 2x2 and Power 2 (#params 156, thickness 6)
arch 6: Added bias module addc1 with 6 biases (#params 162, thickness 6)
arch 7: Added tanh module tanh with linear coefficient 0 (#params 162, thickness 6)
arch 8: Using a full table for conv2_table: 6 -> 16 (96x2)
Added convolution module conv2 with 96 kernels with size 5x5, stride 1x1 and table 96x2 (6->16) (#params 2562, thickness 16)
arch 9: Added bias module addc2 with 16 biases (#params 2578, thickness 16)
arch 10: Added tanh module tanh with linear coefficient 0 (#params 2578, thickness 16)
arch 11: Added abs (#params 2578, thickness 16)
arch 12: Added contrast_norm module with subtractive_norm module with fixed mean weighting and kernel (x:(16x5x5 min 0.000338245 max 0.00829802),dx:,ddx:), across features, not usi
g global normalization, and same convolution and divisive_norm module wstd2_divnorm with kernel 5x5, using zero padding, across features, using fixed filter (5x5 min 0.00541193 max
0.132768) (#params 2578, thickness 16)
arch 13: Added lppooling module l2pool3 with thickness 16, kernel 2x2 ,stride 2x2 and Power 2 (#params 2578, thickness 16)
arch 14: Added bias module addc3 with 16 biases (#params 2594, thickness 16)
arch 15: Added tanh module tanh with linear coefficient 0 (#params 2594, thickness 16)
arch 16: Using a full table for conv5_table: 16 -> 120 (1920x2)

############ detect output END ######################

vali...@gmail.com

unread,
Apr 1, 2013, 2:07:08 AM4/1/13
to ebl...@googlegroups.com, vali...@gmail.com
the_minion,

When 'detect' crashes it outputs this:
"Warning: mem optimization temporarly broken because out is now mstate.
Warning: warning: convolution connection table is not using all inputs in layer conv0 the maximum input index used by the table is 0 but the input is 3x32x32".

Could these warning explain why 'detect' crashes?

Comparing conf file from MNIST deom with conf file from Tutorial 2, I noticed that in first file there are the following parameters in 'training' section which are absent in second file:

data_coeff = .01 # coeff applied after bias
add_features_dimension = 1 # samples are 28x28, make them 1x28x28

May these parameters be a reason of 'detect' crash?

////////////////////

пятница, 29 марта 2013 г., 10:43:01 UTC+4 пользователь vali...@gmail.com написал:

vali...@gmail.com

unread,
Apr 1, 2013, 4:55:53 AM4/1/13
to ebl...@googlegroups.com, vali...@gmail.com
the_minion,

Below is more output which ‘detect’ prints before Windows closes it.
In particular, it outputs line: “Using default resizing module: resizepp module detector resizpp, resizing with method 2 to 0x0 while preserving aspect ratio, pp: none”. May be the problem is with resizing?

############# detect output – BEGIN #############################

Using random seed: -216798249
Looking for trained files in: ./
_____________________ Configuration _____________________
add_features_dimension : 1
addc0_weights :
addc1_weights :
addc2_weights :
addc3_weights :
anneal_period : 0
anneal_value : 0.0
answer : class_answer
arch : conv0,addc0,tanh,abs0,wstd0,l2pool1,addc1,tanh,conv2,addc2,tanh,abs2,wstd2,l2pool3,addc3,tanh,conv5,addc5,tanh,linear7,addc7,tanh
balanced_training : 1
bbox_saving : 2
binary_target : 0
c0 : conv0,addc0,tanh,abs0,wstd0
c2 : conv2,addc2,tanh,abs2,wstd2
c5 : conv5,addc5,tanh
camera : directory
classes : c:/EBLearn/datasets/mnist/mnist_v3/mat/mnist-v3_train_classes.mat
classification : 1
classifier : conv5,addc5,tanh,linear7,addc7,tanh
classifier_hidden : 16
conv0_kernel : 5x5
conv0_stride : 1x1
conv0_table :
conv0_table_in : 1
conv0_table_out : 6
conv0_weights :
conv2_kernel : 5x5
conv2_stride : 1x1
conv2_table_in : thickness
conv2_table_out : 16
conv2_weights :
conv5_kernel : 5x5
conv5_stride : 1x1
conv5_table_in : thickness
conv5_table_out : 120
current_dir : ./
data_coeff : .01
dataset_path : c:/EBLearn/datasets/mnist/mnist_v3/mat
display : 1
epoch_mode : 1
epoch_show_modulo : 400
eta : .0001
f7 : linear7,addc7,tanh
features : conv0,addc0,tanh,abs0,wstd0,l2pool1,addc1,tanh,conv2,addc2,tanh,abs2,wstd2,l2pool3,addc3,tanh
gradient_threshold : 0.0
hardest_focus : 1
ignore_correct : 0
inertia : 0.0
input_dir : c:\EBLearn\datasets\mnist\mnist_v3\detect-images\
input_gain : .01
iterations : 2
keep_outputs : 1
l2pool1_kernel : 2x2
l2pool1_stride : 2x2
l2pool3_kernel : 2x2
l2pool3_stride : 2x2
linear5_in :
linear5_out : noutputs
linear6_in : thickness
linear6_out : 16
linear7_in : thickness
linear7_out : noutputs
max_testing : 0
min_sample_weight : 0
ndiaghessian : 100
no_testing_test : 0
no_training_test : 0
nonlin : tanh
per_class_norm : 1
pool : l2pool
random_class_order : 0
reg : 0
reg_l1 : 0
reg_l2 : 0
reg_time : 0
root2 : ./
run_type : detect
s1 : l2pool1,addc1,tanh
s3 : l2pool3,addc3,tanh
sample_probabilities : 0
save_pickings : 0
save_weights : 1
scaling_type : 4
show_conf : 1
show_hsample : 5
show_train : 1
show_train_correct : 0
show_train_errors : 0
show_train_ninternals : 1
show_val_correct : 1
show_val_errors : 1
show_wait_user : 0
show_wsample : 18
shuffle_passes : 1
subs1_kernel : 2x2
subs1_stride : 2x2
subs3_kernel : 2x2
subs3_stride : 2x2
test_only : 0
train : c:/EBLearn/datasets/mnist/mnist_v3/mat/mnist-v3_train_data.mat
train_labels : c:/EBLearn/datasets/mnist/mnist_v3/mat/mnist-v3_train_labels.mat
trainable_module1_energy : l2_energy
trainer : trainable_module1
training_precision : double
val : c:/EBLearn/datasets/mnist/mnist_v3/mat/mnist-v3_test_data.mat
val_labels : c:/EBLearn/datasets/mnist/mnist_v3/mat/mnist-v3_test_labels.mat
weights : net00002.mat
wstd0_kernel : 5x5
wstd2_kernel : 5x5
_________________________________________________________
Saving outputs to .//detections/
Wrote configuration to .//detections/mnist_v3.conf
Not using Intel IPP.
Initializing 1 detection threads.
initializing thread (unsynched outputs)
Saving outputs to .//detections/
Initializing directory camera from: c:\EBLearn\datasets\mnist\mnist_v3\detect-images\
Image search pattern: .*[.](png|jpg|jpeg|PNG|JPG|JPEG|bmp|BMP|ppm|PPM|pnm|PNM|pgm|PGM|gif|GIF|mat|MAT) in c:\EBLearn\datasets\mnist\mnist_v3\detect-images\
Targets: 2x2
[[ 1 -1 ] [ -1 1 ]]
Using max confidence formula with normalization ratio 2
smoothing kernel:
[[ -0.00524478 -0.0105816 -0.0163916 -0.0204344 -0.0217705 -0.0204344 -0.0163916 -0.0105816 -0.00524478 ]
[ -0.0105816 -0.0190743 -0.0251934 -0.0262128 -0.0254891 -0.0262128 -0.0251934 -0.0190743 -0.0105816 ]
[ -0.0163916 -0.0251934 -0.0239492 -0.0118684 -0.00420322 -0.0118684 -0.0239492 -0.0251934 -0.0163916 ]
[ -0.0204344 -0.0262128 -0.0118684 0.0194892 0.0368525 0.0194892 -0.0118684 -0.0262128 -0.0204344 ]
[ -0.0217705 -0.0254891 -0.00420322 0.0368525 0.059015 0.0368525 -0.00420322 -0.0254891 -0.0217705 ]
[ -0.0204344 -0.0262128 -0.0118684 0.0194892 0.0368525 0.0194892 -0.0118684 -0.0262128 -0.0204344 ]
[ -0.0163916 -0.0251934 -0.0239492 -0.0118684 -0.00420322 -0.0118684 -0.0239492 -0.0251934 -0.0163916 ]
[ -0.0105816 -0.0190743 -0.0251934 -0.0262128 -0.0254891 -0.0262128 -0.0251934 -0.0190743 -0.0105816 ]
[ -0.00524478 -0.0105816 -0.0163916 -0.0204344 -0.0217705 -0.0204344 -0.0163916 -0.0105816 -0.00524478 ]]
Creating a network with 2 outputs and 22 modules (input thickness is -1): conv0,addc0,tanh,abs0,wstd0,l2pool1,addc1,tanh,conv2,addc2,tanh,abs2,wstd2,l2pool3,addc3,tanh,conv5,addc5,tanh,linear7,addc7,tanh
arch 0: Using a full table for conv0_table: 1 -> 6 (6x2)
Added convolution module conv0 with 6 kernels with size 5x5, stride 1x1 and table 6x2 (1->6) (#params 150, thickness 6)
arch 1: Added bias module addc0 with 6 biases (#params 156, thickness 6)
arch 2: Added tanh module tanh with linear coefficient 0 (#params 156, thickness 6)
arch 3: Added abs (#params 156, thickness 6)
arch 4: Added contrast_norm module with subtractive_norm module with fixed mean weighting and kernel (x:(6x5x5 min 0.000901989 max 0.0221281),dx:,ddx:), across features, not using global normalization, and same convolution and divisive_norm module wstd0_divnorm with kernel 5x5, using zero padding, across features, using fixed filter (5x5 min 0.00541193 max 0.132768) (#params 156, thickness 6)
arch 5: Added lppooling module l2pool1 with thickness 6, kernel 2x2 ,stride 2x2 and Power 2 (#params 156, thickness 6)
arch 6: Added bias module addc1 with 6 biases (#params 162, thickness 6)
arch 7: Added tanh module tanh with linear coefficient 0 (#params 162, thickness 6)
arch 8: Using a full table for conv2_table: 6 -> 16 (96x2)
Added convolution module conv2 with 96 kernels with size 5x5, stride 1x1 and table 96x2 (6->16) (#params 2562, thickness 16)
arch 9: Added bias module addc2 with 16 biases (#params 2578, thickness 16)
arch 10: Added tanh module tanh with linear coefficient 0 (#params 2578, thickness 16)
arch 11: Added abs (#params 2578, thickness 16)
arch 12: Added contrast_norm module with subtractive_norm module with fixed mean weighting and kernel (x:(16x5x5 min 0.000338245 max 0.00829802),dx:,ddx:), across features, not using global normalization, and same convolution and divisive_norm module wstd2_divnorm with kernel 5x5, using zero padding, across features, using fixed filter (5x5 min 0.00541193 max 0.132768) (#params 2578, thickness 16)
arch 13: Added lppooling module l2pool3 with thickness 16, kernel 2x2 ,stride 2x2 and Power 2 (#params 2578, thickness 16)
arch 14: Added bias module addc3 with 16 biases (#params 2594, thickness 16)
arch 15: Added tanh module tanh with linear coefficient 0 (#params 2594, thickness 16)
arch 16: Using a full table for conv5_table: 16 -> 120 (1920x2)
Added convolution module conv5 with 1920 kernels with size 5x5, stride 1x1 and table 1920x2 (16->120) (#params 50594, thickness 120)
arch 17: Added bias module addc5 with 120 biases (#params 50714, thickness 120)
arch 18: Added tanh module tanh with linear coefficient 0 (#params 50714, thickness 120)
arch 19: Added linear module linear7 120 -> 2 (#params 50954, thickness 2)
arch 20: Added bias module addc7 with 2 biases (#params 50956, thickness 2)
arch 21: Added tanh module tanh with linear coefficient 0 (#params 50956, thickness 2)
arch: loaded 22 modules.
Loading weights from: [ net00002.mat ]
Concatenated 1 matrices into 1: 50956 from [ net00002.mat ]
Loaded weights from 50956: (x:[ 50956 ])
Targets: 2x2
[[ 1 -1 ] [ -1 1 ]]
Using answer module: class_answer module class_answer with 2 classes, confidence type 2 and targets 2x2.
No resizepp module found in network.
Using default resizing module: resizepp module detector resizpp, resizing with method 2 to 0x0 while preserving aspect ratio, pp: none
Classes labels: [ 1 2 ]
network strides: 1x1
No merging module found in network.
Scaler mode is disabled.
Non-maximum suppression (nms): none
Setting input gain to 0.01
Saving bboxes in all formats.
detector_gui: not showing extracted windows.

############# detect output – END #############################


/////////////////////////////

пятница, 29 марта 2013 г., 10:43:01 UTC+4 пользователь vali...@gmail.com написал:

soumith

unread,
Apr 1, 2013, 9:27:52 AM4/1/13
to ebl...@googlegroups.com, vali...@gmail.com
Valinbox,

None of those are a problem. Can you send me your conf and your weights file zipped. Alternatively, you can compile detect in debug mode, and it will give you a clear error on where it crashes. 

Since I can't reproduce the problem, I really cant say what's happening.

--
S

--
You received this message because you are subscribed to the Google Groups "eblearn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eblearn+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



vali...@gmail.com

unread,
Apr 1, 2013, 11:07:41 AM4/1/13
to ebl...@googlegroups.com, vali...@gmail.com
the_minion,

I sent you these files zipped. Please notify me, if you will not receive these files.

/////////////

понедельник, 1 апреля 2013 г., 17:27:52 UTC+4 пользователь the_minion написал:

zhihong...@gmail.com

unread,
Dec 2, 2013, 2:24:29 PM12/2/13
to ebl...@googlegroups.com, vali...@gmail.com
Hi the minion and Valinbox,

I have the same problem, but I do experiments on svhn and RGB images
I thought that the reason could be lack of pre-process module, based on http://eblearn.cs.nyu.edu:21991/doku.php?id=detect

"
During the training phase, your training data was most likely pre-processed already. We need to tell the resize module to use the same pre-processing that was used for training data.
"

So I add
arch = resizepp0,${my_architecture}
resizepp0_pp = rgb_to_ynuv0
rgb_to_ynuv0_kernel = 7x7
rgb_to_ynuv0_global_norm = 0

But I got other error as follows

arch 1: unknown module type conv
Error: failed to load module conv051

Would you please tell me how you solve the problem? Thanks.

zhihong...@gmail.com

unread,
Dec 2, 2013, 6:00:16 PM12/2/13
to ebl...@googlegroups.com, vali...@gmail.com, zhihong...@gmail.com
I fixed the problem I mentioned above:

It should be
arch=resizepp0,${features},${classifier}

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

Note: the error is the space between resizeapp0 and ${features}.

Currently I can load network and the image, then the program crash with the following output

Found merging module(s) in network: [ 0x7f49cc048780 ]
flat_merge module merge2, merging 2 inputs: (in 4x4 stride 1x1 scale 1x1), (in 4x4 stride 1x1 scale 1x1),
Aligning merging centers on top left image origin.
merge2's input 0 must be padded/narrowed with [ 3 3 3 3 ] to recenter rect:<(0,0),12x12> (center 6x6), (output stride is 2x2)
merge2's input 1 must be padded/narrowed with [ 3 3 3 3 ] to recenter rect:<(0,0),12x12> (center 6x6), (output stride is 2x2)
merge2: setting strides to [ 1x1 1x1 ] with reference scale 1 with stride: 1x1


Warning: mem optimization temporarly broken because out is now mstate.

Scaler mode is disabled.
Non-maximum suppression (nms): none

Saving bboxes in all formats.
detector_gui: not showing extracted windows.

1/2: grabbing data/digits/2.png
loaded image data/digits/2.png
processing 2.png
starting processing of frame 2.png
Scales: input: 3x32x32 min: 16x12x12 max: 3x32x32
Scaling type 4: 1 scale only, the image's original scale.
Detection initialized to 1 input resolutions: [ 3x32x32 ]
Segmentation fault (core dumped)

Do you have any suggestion? Thanks

the_minion

unread,
Dec 3, 2013, 4:24:53 PM12/3/13
to ebl...@googlegroups.com, vali...@gmail.com, zhihong...@gmail.com
It works fine for me, so it is hard for me to debug your issues, give me more information if you can. Compile detect in debug mode by going to eblearn/tools and executing "make detect_debug" and see what the debug version says.

the_minion

unread,
Dec 3, 2013, 4:55:20 PM12/3/13
to ebl...@googlegroups.com, vali...@gmail.com, zhihong...@gmail.com
Check if the face detection works:
cd eblearn/demos/face

../../bin/detect face.conf

zhihong...@gmail.com

unread,
Jan 7, 2014, 4:40:28 PM1/7/14
to ebl...@googlegroups.com, vali...@gmail.com, zhihong...@gmail.com
end-to-end face detector works fine for me. I fail for end-to-end svhn classification (especially, I fail to detect svhn.conf imagedir. It seems that svhn.conf is for train not for detection).
Could you please give more instructions for svhn such as end-to-end face detector builder?
In addition, do you have research for svhn segmentation?
Reply all
Reply to author
Forward
0 new messages