shamangary / FSA-Net

[CVPR19] FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image
Apache License 2.0
609 stars 155 forks source link

Problem about training #1

Closed w11m closed 5 years ago

w11m commented 5 years ago

i already download the data.zip you porvide, and replace all folder but after run the train.sh get this

IOError: Unable to open file (unable to open file: name = 'synhead_noBIWI_models/fsanet_noS_capsule_3_16_2_192_5/fsanet_noS_capsule_3_16_2_192_5.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)

what did i missed? thank you

shamangary commented 5 years ago

Sorry I couldn't reproduce the error. Can you post the whole error message?

w11m commented 5 years ago

Sorry I couldn't reproduce the error. Can you post the whole error message?

ok, but i accident close the terminal , i'll post the whole error message after run train.sh again thank you

w11m commented 5 years ago

just have another question, can i use the pre-trained model to test on my own image?

shamangary commented 5 years ago

The pre-trained model can be used by yourself. Our demo (plotting poses on images) file will be released soon.

w11m commented 5 years ago

here is the log.file (error message) from terminal https://www.docdroid.net/EdO4mFc/log.txt

thanks for the help i can get the yaw,roll,pitch from the pretrained model

shamangary commented 5 years ago

Hello. I re-download the data.zip and re-run it again. No error is shown similar to yours. Here are my suggestions.

  1. Run one line at a time, and comment all the other command in the shell script.
  2. Mark sure to call 'KERAS_BACKEND=tensorflow' before calling python command
  3. Check the version of your environment. Anaconda is recommended.
    python                    3.5.6                hc3d631a_0  
    keras-applications        1.0.4                    py35_1    anaconda
    keras-base                2.2.2                    py35_0    anaconda
    keras-gpu                 2.2.2                         0    anaconda
    keras-preprocessing       1.0.2                    py35_1    anaconda
    tensorflow                1.10.0          mkl_py35heddcb22_0  
    tensorflow-base           1.10.0          mkl_py35h3c3e929_0  
    tensorflow-gpu            1.10.0               hf154084_0    anaconda
    cudnn                     7.1.3                 cuda8.0_0  
    cuda80                    1.0                           0    soumith
    numpy                     1.15.2          py35_blas_openblashd3ea46f_0  [blas_openblas]  conda-forge
    numpy-base                1.14.3           py35h2b20989_0  
w11m commented 5 years ago

@shamangary thanks a lot i'll try to fix the problem

jake221 commented 5 years ago

@shamangary thanks a lot i'll try to fix the problem

the problem is caused by the path mismatch. you should copy the pre-trained model file, e.g. 300W_LP_models to the training_and_testing path

shamangary commented 5 years ago

Hello @jake221, I separate the pre-trained model from the training_and_testing path on purpose since training will create new files and replaces the original pre-trained model. However, the first question includes loading pre-trained model which is not part of the training. That's why I am so confused. :)

jake221 commented 5 years ago

Hello @jake221, I separate the pre-trained model from the training_and_testing path on purpose since training will create new files and replaces the original pre-trained model. However, the first question includes loading pre-trained model which is not part of the training. That's why I am so confused. :)

I also encounter the same problem during inference.

However, I test your pretrained model fsanet_var_capsule_3_16_2_21_5.h5 in my own dataset for head pose estimation. The predicted euler angle is not as stable as hopenet. So did you test on your pratical dataset?

shamangary commented 5 years ago

Thanks for the feedback @jake221. Sorry I have no access to any non-public dataset. The condition could be different in terms of the background or noise. Different preprocessing could be needed.

jake221 commented 5 years ago

Thanks for the feedback @jake221. Sorry I have no access to any non-public dataset. The condition could be different in terms of the background or noise. Different preprocessing could be needed.

I also have no access to non-public dataset. My object is myself and my colleague. Haha!

shamangary commented 5 years ago

We are also doing a demo version. Please wait for that :)

shamangary commented 5 years ago

@w11m @jake221 The demo is ready. Feel free to try. :) Already tested on my webcam and the results are consistent with our paper. Thanks for the appreciation again.

w11m commented 5 years ago

@shamangary I fix the training error it was caused by the python version and numpy version, now it works pretty GOOD!. Thanks for the demo:) I saw the webcam pose visualize.Is the demo gif depend on LBP? Because is not stable on the face

shamangary commented 5 years ago

@w11m Yes. Using LBP is a compromise since my laptop cannot run mtcnn in real-time. Better face detection and tracking would be needed in the future. :)

jake221 commented 5 years ago

@w11m @jake221 The demo is ready. Feel free to try. :) Already tested on my webcam and the results are consistent with our paper. Thanks for the appreciation again.

Thanks for your update! I try your demo and this time I get a very stable result which is good to produce reliable liveness detection demo. More importantly, your FSA-Net is small and fast to run in mobile device. A 11 seconds video takes only 16 seconds to get predicted euler angle in CPU. However, it takes around 35 seconds to predict euler angle in GPU for Hopenet. Great work!