ZheC / Realtime_Multi-Person_Pose_Estimation

Code repo for realtime multi-person pose estimation in CVPR'17 (Oral)
Other
5.08k stars 1.37k forks source link

Questions about setLayers.py #56

Open SimonPrPr opened 7 years ago

SimonPrPr commented 7 years ago

Hi! im junior students from SJTU. Im trying to train a model follow your steps. But I was stuck at the Setlayers step. I'm not very clear about the meaning of the direction "dataFolder" and "Source" in the setLayers.py . Because i didn't find some files or directions like "lmdb_trainVal". I just generate two lmdb files named data.mdb and lock.mdb in ".//training/dataset/COCO/coco_kpt/" would you please tell me how to set the relevant directions? Many Thx!

FengyangZhang commented 7 years ago

I think you should just put your data.mdb dir in the dataFolder and source, that's what they are for.

SimonPrPr commented 7 years ago

@FengyangZhang But when i tried to run "bash pose_train.sh" to train the model. I met the below errors. I0517 14:22:57.272814 27768 cpm_data_transformer.cpp:242] CPMDataTransformer constructor done. I0517 14:22:57.274088 27774 db_lmdb.cpp:35] Opened lmdb /sdb/lwj/Realtime_Multi-Person_Pose/training/dataset/COCO/coco_kpt/lmdb terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Aborted at 1495002177 (unix time) try "date -d @1495002177" if you are using GNU date PC: @ 0x7fbc49026c37 (unknown) SIGABRT (@0x3f500006c78) received by PID 27768 (TID 0x7fbc25356700) from PID 27768; stack trace: @ 0x7fbc49026cb0 (unknown) @ 0x7fbc49026c37 (unknown) @ 0x7fbc4902a028 (unknown) @ 0x7fbc49637bbd (unknown) @ 0x7fbc49635b96 (unknown) @ 0x7fbc49635be1 (unknown) @ 0x7fbc49635df8 (unknown) @ 0x7fbc4965a5bf (unknown) @ 0x7fbc4968ff82 (unknown) @ 0x7fbc49690087 (unknown) @ 0x7fbc4969198b (unknown) @ 0x7fbc4a6bc69a caffe::db::LMDBCursor::value() @ 0x7fbc4a6e07ae caffe::DataReader::Body::read_one() @ 0x7fbc4a6e0c91 caffe::DataReader::Body::InternalThreadEntry() @ 0x7fbc4a68f935 caffe::InternalThread::entry() @ 0x7fbc40baca4a (unknown) @ 0x7fbc3b1f5184 start_thread @ 0x7fbc490ea37d (unknown) @ 0x0 (unknown)

Do you know why?

FengyangZhang commented 7 years ago

You can just check the data source in the pose_train_test.prototxt,see if it points to the dir of you lmdb files.

SimonPrPr commented 7 years ago

@FengyangZhang I'm sure that it's the correct path. but there's one thing. I just generate the lmdb files with a smaller dataset.

I add several lines in getANNO.m to get a smaller dataset.

    if mode == 1
      trypath = sprintf('/sdb/lwj/Realtime_Multi-Person_Pose/training/dataset/COCO/images/train2014/COCO_train2014_%012d.jpg', my_anno(i).image_id);
    else
      trypath = sprintf('/sdb/lwj/Realtime_Multi-Person_Pose/training/dataset/COCO/images/val2014/COCO_val2014_%012d.jpg',my_anno(i).image_id);
    end

    if exist(trypath,'file') == 0
       continue;
    end

And all the other steps are the same. Will this make a big difference?

FengyangZhang commented 7 years ago

I don't know what exactly happened, but that should be the reason.

SimonPrPr commented 7 years ago

@FengyangZhang Have you successfully trained the model ?Could you please tell how did you process the data? Or you just use the raw dataset. The 189Gb lmdb file?

FengyangZhang commented 7 years ago

I used the raw dataset and it trained smoothly.

SimonPrPr commented 7 years ago

@FengyangZhang finally I got the model . But im not sure how to test it. Do you know how to test it with python? It seems that i lack of a file named "configobj"

SimonPrPr commented 7 years ago

@FengyangZhang i've already installed the configobj. and successfully import all the modules. but the program just alert me that "net is not defined". Do you know why?

salvador-blanco commented 6 years ago

@SimonPrPr @FengyangZhang Could you explain how you solved the folders:

directory = 'COCO_exp_caffe/pose56/exp22/'  #      directory = 'COCO_exp_caffe/pose56/exp22/'
        serverFolder = 'COCO_kpt/pose56/exp22'   #      serverFolder = '/home/zhecao/COCO_kpt/pose56/exp22'
        base_folder = 'arch/'+directory+'model'   #      base_folder = '/media/posenas4b/User/zhe/arch/'+directory+'model'
        dataFolder = 'COCO_kpt/lmdb_trainVal'   #      dataFolder = '/home/zhecao/COCO_kpt/lmdb_trainVal'
        source = 'COCO_kpt/lmdb_trainVal'  #      source = '/home/zhecao/COCO_kpt/lmdb_trainVal'

Which folders/files should they point ? The output I get is:

...
...
...
Mrelu6_stage5_L2
Mconv7_stage5_L1    ch=38   4.0
Mconv7_stage5_L2    ch=19   4.0
loss 5 level 1
loss 5 level 2
['concat_stage6', 'concat_stage6']
Mconv1_stage6_L1    ch=128  4.0
Mrelu1_stage6_L1
Mconv1_stage6_L2    ch=128  4.0
Mrelu1_stage6_L2
Mconv2_stage6_L1    ch=128  4.0
Mrelu2_stage6_L1
Mconv2_stage6_L2    ch=128  4.0
Mrelu2_stage6_L2
Mconv3_stage6_L1    ch=128  4.0
Mrelu3_stage6_L1
Mconv3_stage6_L2    ch=128  4.0
Mrelu3_stage6_L2
Mconv4_stage6_L1    ch=128  4.0
Mrelu4_stage6_L1
Mconv4_stage6_L2    ch=128  4.0
Mrelu4_stage6_L2
Mconv5_stage6_L1    ch=128  4.0
Mrelu5_stage6_L1
Mconv5_stage6_L2    ch=128  4.0
Mrelu5_stage6_L2
Mconv6_stage6_L1    ch=128  4.0
Mrelu6_stage6_L1
Mconv6_stage6_L2    ch=128  4.0
Mrelu6_stage6_L2
Mconv7_stage6_L1    ch=38   4.0
Mconv7_stage6_L2    ch=19   4.0
loss 6 level 1
loss 6 level 2
find dataset/COCO/COCO_kpt_lmdb -name "batch*" | sort > COCO_kpt/pose56/exp22/filelist_train.txt
gtk@gtk:~/Documents/OpenPose/Realtime_Multi-Person_Pose_Estimation-master/training$ 
chen-xi-wang commented 5 years ago

@salvador-blanco Hi, the same issue happened, it prints out: loss 1 level1, loss 1 level 2, until loss 6 level 2. Did you solve it? Thanks

wine99 commented 5 years ago

@chen-xi-wang I met the same problem. Did u solved it?