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

Multiple file missing and wanting for an library list #21

Open
lxrswdd opened this issue Jun 20, 2023 · 3 comments
Open

Multiple file missing and wanting for an library list #21

lxrswdd opened this issue Jun 20, 2023 · 3 comments

Comments

@lxrswdd
Copy link

lxrswdd commented Jun 20, 2023

When I am running the demo python photometric_fitting.py 00000 cuda
First problem:
FileNotFoundError: [Errno 2] No such file or directory: './data/generic_model.pkl'
I downloaded flame2023.pkl and rename to it. I am not sure this is the right thing to do.
Further another problem appeared.

/home/guest/anaconda3/envs/smart_class/lib/python3.10/site-packages/pytorch3d/io/obj_io.py:548: UserWarning: Mtl file does not exist: ./data/template.mtl
  warnings.warn(f"Mtl file does not exist: {f}")
making ./test_results//00000
----iter: 0, time: 2023-06-20-20:31:41
landmark: 0.12438790500164032, all_loss: 0.12438790500164032,
Traceback (most recent call last):
  File "/data/share/FLAME/Photometric_fitting/photometric_optimization/photometric_fitting.py", line 265, in <module>
    fitting.run(imagepath, landmarkpath)
  File "/data/share/FLAME/Photometric_fitting/photometric_optimization/photometric_fitting.py", line 218, in run
    single_params = self.optimize(images, landmarks, image_masks, savefolder)
  File "/data/share/FLAME/Photometric_fitting/photometric_optimization/photometric_fitting.py", line 91, in optimize
    util.tensor_vis_landmarks(images[visind], landmarks[visind]))
  File "/data/share/FLAME/Photometric_fitting/photometric_optimization/util.py", line 209, in tensor_vis_landmarks
    image_landmarks = plot_kpts(image, predicted_landmark, color)
  File "/data/share/FLAME/Photometric_fitting/photometric_optimization/util.py", line 250, in plot_kpts
    image = cv2.circle(image,(st[0], st[1]), 1, c, 2)
cv2.error: OpenCV(4.7.0) :-1: error: (-5:Bad argument) in function 'circle'
> Overload resolution failed:
>  - Can't parse 'center'. Sequence item with index 0 has a wrong type
>  - Can't parse 'center'. Sequence item with index 0 has a wrong type

In addition, I have to install different versions of libraries to fit the codes?
Can you please update an library list so we can install the correct versions?

@lxrswdd lxrswdd changed the title FileNotFoundError: [Errno 2] No such file or directory: './data/generic_model.pkl' Multiple file missing and wanting for an library list Jun 21, 2023
@CengizhanYurdakul
Copy link

same issue

@chiewhui1113
Copy link

Replace line 250 - 254 in util.py to:

image = cv2.circle(image, (int(st[0]), int(st[1])), 1, c, 2)
if i in end_list:
continue
ed = kpts[i + 1, :2]
image = cv2.line(image, (int(st[0]), int(st[1])), (int(ed[0]), int(ed[1])), (255, 255, 255), 1)

This works for me

@KhanhNgoDuy
Copy link

the generic_model.pkl file can be found in 2020 version

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

4 participants