Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruction for running this open source code #29

Open
ken881015 opened this issue Nov 27, 2023 · 1 comment
Open

Instruction for running this open source code #29

ken881015 opened this issue Nov 27, 2023 · 1 comment

Comments

@ken881015
Copy link

ken881015 commented Nov 27, 2023

I follow README.md for loading checkpoint "net_021.pth" prepared by author but the process is not that smoothly.
So I record what I have done for fix those problem.

Info

  • Done: Not Yet

Environment

  • I follow requirement.txt for install packages I needs for running by conda.
  • Every package installed are followed requirement.txt, and here is something you should noticed!
    image

Torch version

  • torch is 1.2.0, and the version has vital effect when you load "net_021.pth" as pre-trained checkpoint.
    Just as this guy mentioned, different version of torch have different strategy for convolution operation. So if you what to use pre-trained model "net_021.pth". Notice your yorch version.

How about running by newest torch such as 1.17.0 or 2.0.0?

  • the method of fixing mis-match of feature map size from the message below.
    image
    • I just turn self.conv2 in ResBlock4 from conv4x4 to conv3x3, and you can get a well-function but untrained model.
    • And maybe you can train it now ? (I haven't do this yet)

Numba

  • Error msg of numba may related to the version of its dependent package not listed in requirement.txt: llvmlite==0.32.1
    image

Inference

  • In README.md chapter Predicting
    • the step are too simple for follow currently, and if you are using other data not belong to AFLW2000-3D or 300w-lp, you can't get what you want....

Predicting AFLW2000-3D

  • original command is only suitable for AFLW2000-3D or 300w-lp which has go through pre-process by prepare_dataset.py
    • Like this
      image
    • And get this
      image

How to predict our own data?

  • The most easy way is
    • Put jpg file (ex. name.jpg) in data/example/name
    • Add a if here:
      • "src/dataset/dataloader.py; class ImageData; func read_path; before loadmat function line 41 "
        image
      • And you can predict whatever you want!!
        image

Face-Profiling Algorithm and 'data/dataset/Extra_LP' ?

  • Undone....

Welcome for any discussion. Hope we can fight together!!!

@WZUchen
Copy link

WZUchen commented Mar 22, 2024

Hello! I hope I'm not disturbing you. May I ask if it's necessary to preprocess the JPG files before placing them in the data/example/name directory? @ken881015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants