Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to extract shape_predictor_68_face_landmarks.dat for bz

I am trying to run some face frontalization code (using Python3 on Windows10), the code uses opencv and dlib and requires a file called shape_predictor_68_face_landmarks.dat. The code tries to automatically download it and then unzip it but it fails to unzip giving an unexpected end of archive error. I tried to use WinRaR to repair the file (which I also tried manualy downloading from http://sourceforge.net/projects/dclib/files/dlib/v18.10/shape_predictor_68_face_landmarks.dat.bz2) but it says it can only repair .zip and .rar files.

Does anyone know where I can download the uncompressed .dat file from? Or alternatively how I can repair a damaged .bz file in Windows?

like image 952
Dan Avatar asked Jul 19 '17 00:07

Dan


2 Answers

The file is available at http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

I downloaded it and verified that extraction works. The file is smaller than the one used in the previous version, but I think that is due to improvements.

In case this does not work, let me (or Davis King, who maintains the dlib blog) know so that you can get the uncompressed version.

like image 125
Totoro Avatar answered Nov 12 '22 16:11

Totoro


Downloading using the CLI is a lot easier.

wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2

To decompress the compressed file you just downloaded, use the following command

bzip2 -d shape_predictor_68_face_landmarks.dat.bz2
like image 39
Anirudh B.S Avatar answered Nov 12 '22 18:11

Anirudh B.S