Closed ghost closed 6 years ago
Those examples use different networks. You can't load a network saved with one network architecture into a network defined to use a different architecture. Make them the same if you want to do this.
thank you for reply. I solved problem
I compiled example cpp codes using cmake without modifying it, but I got padding error when running dnn_mmod_ex, dnn_mmod_face_detection_ex example program.
Expected Behavior
I tried to make my own face object detector. At first, using the imglab tool, I created a training dataset, testing dataset, each consisting of 5 images. After creating the xml file, I compiled the examples using cmake. No cpp code was modified, and no compilation error occurred. I trained the dataset using the dnn_mmod_ex program and ran the dnn_mmod_face_detection_ex program using the output dat file, but padding error occurred.
Current Behavior
...... step#: 4872 learning rate: 0.0001 average loss: 0.0268335 steps without apparent progress: 64 step#: 4928 learning rate: 0.0001 average loss: 0.0289584 steps without apparent progress: 140 step#: 4984 learning rate: 0.0001 average loss: 0.028881 steps without apparent progress: 196 Saved state to mmodsync step#: 5040 learning rate: 0.0001 average loss: 0.0283179 steps without apparent progress: 252 Saved state to mmod_sync done training training results: 1 1 1
testing results: 1 0 0
dnn_trainer details: net_type::num_layers: 21 net size: 0.321325MB net architecture hash: e608cc6ea53e21dc0636dcca1420f59d loss: loss_mmod (detector_windows:(42x40), loss per FA:1, loss per miss:1, truth match IOU thresh:0.5, overlaps_nms:(0.1,0.1), overlaps_ignore:(0.5,1)) synchronization file: mmod_sync trainer.get_solvers()[0]: sgd: weight_decay=0.0005, momentum=0.9 learning rate: 1e-05 learning rate shrink factor: 0.1 min learning rate: 1e-05 iterations without progress threshold: 300 test iterations without progress threshold: 500 random_cropper details: chip_dims.rows: 200 chip_dims.cols: 200 randomly_flip: true max_rotation_degrees: 30 min_object_length_long_dim: 40 min_object_length_short_dim: 40 max_object_size: 0.7 background_crops_fraction: 0.5 translate_amount: 0.1
$ ./dnn_mmod_face_detection_ex mmod_network.dat ~/test_images/01.jpg An error occurred while trying to read the first object from the file mmod_network.dat. ERROR: Wrong paddingy found while deserializing dlib::con
Steps to Reproduce
training dataset directory ~/images$ l total 2.7M -rw-rw-r-- 1 luke luke 539K 2월 5 10:47 000-1-0.jpg -rw-rw-r-- 1 luke luke 534K 2월 5 10:47 000-1-1.jpg -rw-rw-r-- 1 luke luke 525K 2월 5 10:47 000-1-2.jpg -rw-rw-r-- 1 luke luke 540K 2월 5 10:47 000-1-3.jpg -rw-rw-r-- 1 luke luke 505K 2월 5 10:47 000-1-4.jpg drwxrwxr-x 2 luke luke 4.0K 2월 5 15:46 test -rw-rw-r-- 1 luke luke 827 2월 5 15:47 testing.xml -rw-rw-r-- 1 luke luke 802 2월 5 15:48 training.xml
testing dataset directory ~/images/test$ l total 1.7M -rw-rw-r-- 1 luke luke 359K 2월 5 10:54 002-1-0.jpg -rw-rw-r-- 1 luke luke 351K 2월 5 10:54 002-1-1.jpg -rw-rw-r-- 1 luke luke 337K 2월 5 10:54 002-1-2.jpg -rw-rw-r-- 1 luke luke 350K 2월 5 10:54 002-1-3.jpg -rw-rw-r-- 1 luke luke 328K 2월 5 10:54 002-1-4.jpg
Nothing changed dnn_mmod.ex.cpp. I just compile with cmake and run program