D-X-Y / landmark-detection

Four landmark detection algorithms, implemented in PyTorch.
https://xuanyidong.com/assets/projects/TPAMI-2020-SRT.html
MIT License
925 stars 180 forks source link

Hit an AssertionError when running gen_mean_face.py in SAN #52

Closed john-bao-git closed 5 years ago

john-bao-git commented 5 years ago

If you are submitting a feature request, please preface the title with [feature request].

If you are submitting a bug report, please fill in the following details.

Which project are you using?

SAN or SBR or TS3 or others? SAN

Issue description

I ran gen_mean_face.py with the dataset folders in my home directory but I hit this error: AssertionError: /home/dxy/datasets/300W-Style/300W-Original/afw/4538917191_17.jpg is not a file I might have misinterpreted what /home/dxy is, but I am sure I placed the datasets folder in my home directory.

Google has not said anything either, only taking it as US dollar.

D-X-Y commented 5 years ago

/home/dxy is the home directory path on my local machine. I will check the path soon

D-X-Y commented 5 years ago

@MANGA-1614 Did you download the snapshot provided by me and then run gen_mean_face.py. If so some file paths in the snapshot is that on my machine, you can (1) generate those snapshots on your machine and then run gen_mean_face.py or (2) modify gen_mean_face.py to correct the path.

john-bao-git commented 5 years ago

Hi,

Thank you for your response. I modified the snapshot files instead. I now ran into a different problem.

AssertionError: The path : ./snapshots/BASE-CLUSTER-300W_GTB-3/cluster-00-03.lst is not a file.

I looked through your snapshot folder in Google Drive but couldn't find this. Was I supposed to make this myself?

On Fri, Nov 22, 2019 at 7:39 PM D-X-Y notifications@github.com wrote:

Closed #52 https://github.com/D-X-Y/landmark-detection/issues/52.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/D-X-Y/landmark-detection/issues/52?email_source=notifications&email_token=AC7NDCU4MLQSXOBCAPQ4RILQVB3S5A5CNFSM4JQTTW3KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOVBQ2BEY#event-2824970387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7NDCWYRXK5YCRJLPHPWGTQVB3S5ANCNFSM4JQTTW3A .

D-X-Y commented 5 years ago

@MANGA-1614 You can (1) generate by your own by running bash scripts/300W/300W_Cluster.sh 0,1 GTB 3 as in https://github.com/D-X-Y/landmark-detection/tree/master/SAN#300-w or (2) use the existing one from https://drive.google.com/open?id=1DtUg0LoZXNuDxeqRtcRxrA4tjrN9rpJa . I prefer you generate it on your own as this step does not cost much time.

john-bao-git commented 5 years ago

@D-X-Y/landmark-detection reply@reply.github.com,

I do have that one, straight from Google Drive. I couldn't run it since it was a shell script and most of my Python was done in Windows.

However, in gen_mean_face.py, it looks out for 2 lists: CLUSTER-300W_GTB-3 and BASE-CLUSTER-300W_GTB-{:d}.

` save_path = osp.join('cache_data', 'cache', 'clusters', '300W-{:}'.format(cluster_num), '300W-{:}-{:}.png'.format(i, cluster_num))

calculate_mean(['./snapshots/CLUSTER-300W_GTB-{:d}/cluster-{:02d}-{:02d}.lst'.format(cluster_num, i, cluster_num)], 68, save_path)

save_path = osp.join('cache_data', 'cache', 'clusters',

'300W-BASE-{:}'.format(cluster_num), '300W-BASE-{:}-{:}.png'.format(i, cluster_num))

calculate_mean(['./snapshots/BASE-CLUSTER-300W_GTB-{:d}/cluster-{:02d}-{:02d}.lst'.format(cluster_num, i, cluster_num)], 68, save_path) `

I got through the first one, but not the second one.

I'm terribly sorry about my inquiries. I'm new to both Python and Computer Vision.

On Fri, Nov 22, 2019 at 9:40 PM D-X-Y notifications@github.com wrote:

@MANGA-1614 https://github.com/MANGA-1614 You can (1) generate by your own by running bash scripts/300W/300W_Cluster.sh 0,1 GTB 3 as in https://github.com/D-X-Y/landmark-detection/tree/master/SAN#300-w or (2) use the existing one from https://drive.google.com/open?id=1DtUg0LoZXNuDxeqRtcRxrA4tjrN9rpJa . I prefer you generate it on your own as this step does not cost much time.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/D-X-Y/landmark-detection/issues/52?email_source=notifications&email_token=AC7NDCQL37PNWLG32DNXOGDQVCJYTA5CNFSM4JQTTW3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7LOAY#issuecomment-557758211, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7NDCVUMQRQNEQUZALCUU3QVCJYTANCNFSM4JQTTW3A .

D-X-Y commented 5 years ago

I see. The "BASE-C...." is generated by scripts/300W/300W_Base_Cluster.sh. You can try to modify the script to run on Windows.

john-bao-git commented 5 years ago

Ah ok, I see. Sounds good. I'll try to edit that then.

Right now, I've decided to comment it out. I'll return it back if anything happens.

On Fri., Nov. 22, 2019, 21:50 D-X-Y notifications@github.com wrote:

I see. The "BASE-C...." is generated by scripts/300W/300W_Base_Cluster.sh. You can try to modify the script to run on Windows.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/D-X-Y/landmark-detection/issues/52?email_source=notifications&email_token=AC7NDCVKSWHXQY5ZTECWRELQVCK67A5CNFSM4JQTTW3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE7LTPI#issuecomment-557758909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7NDCT5BC7OCDHJGOCKTPTQVCK67ANCNFSM4JQTTW3A .