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

运行get_features_into_CSV.py时报错 #3

Closed
EstellaCheng opened this issue Jul 26, 2018 · 5 comments
Closed

运行get_features_into_CSV.py时报错 #3

EstellaCheng opened this issue Jul 26, 2018 · 5 comments

Comments

@EstellaCheng
Copy link

我clone代码到本地后,将get_from_camera里的照片清空,然后修改路径后,运行get_faces_from_camera后得到自己的数据集。然后把default_person.csv也删除了,再运行get_features_into_CSV.py,结果报错如下:
Traceback (most recent call last):

File "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/get_features_into_CSV.py", line 76, in
write_into_csv(path_pics, path_csv + "default_person.csv")
File "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/get_features_into_CSV.py", line 67, in write_into_csv
features_128d = return_128d_features(path_pics + dir_pics[i])
File "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/get_features_into_CSV.py", line 43, in return_128d_features
face_descriptor = facerec.compute_face_descriptor(img_gray, shape)
RuntimeError: The full_object_detection must use the iBUG 300W 68 point face landmark style.

Process finished with exit code 1
我后来把图像换成博主原来的图像,再次运行还是报这个错。。。请博主赐教。

@coneypo
Copy link
Owner

coneypo commented Jul 26, 2018 via email

@EstellaCheng
Copy link
Author

我单独运行了get_128d_features(),出现了问题。报错如下:
Traceback (most recent call last):
File "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/test.py", line 24, in
get_128d_features("D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/data/get_from_camera/img_face_1.jpg")
File "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/test.py", line 15, in get_128d_features
dets = detector(img_gray, 1)
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.

以下是我修改源码的地方:
在get_faces_from_camera.py里面修改了存储路径。

保存

line 28 path_save = "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/data/get_from_camera/"

在get_features_into_CSV.py里面也是修改了路径,共三处:
line 18 path_pics = "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/data/get_from_camera/"
line 19 path_csv = "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/data/csvs/"

line 78 path_csv_rd = "D:/360Downloads/JetBrains/Dlib_face_recognition_from_camera-master/data/csvs/default_person.csv"

谢谢博主抽空帮我解决问题啦!

@coneypo
Copy link
Owner

coneypo commented Jul 26, 2018 via email

@EstellaCheng
Copy link
Author

真是十分感谢博主啦。下了班还要帮我解决问题。。可是,,我把整个项目重新下载了一遍,就改了get_features_into_CSV.py里面的路径,运行起来还是会有哪个问题。。。。呜呜呜呜~~~天要灭我

@coneypo
Copy link
Owner

coneypo commented Sep 7, 2018

你好,请 clone 最新的代码,这个 issue 应该不会复现了;
如果没问题请 close 下,谢谢;

@coneypo coneypo closed this as completed Sep 7, 2018
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