Facenet: ./align/align_dataset_mtcnn.py No module named 'align'

Created on 30 Jan 2018  ·  5Comments  ·  Source: davidsandberg/facenet

my environment Anaconda3 and python3.6 and scikit-learn is the newest
when i execute
python ./align/align_dataset_mtcnn.py ./data/images --image_size 160--margin 32 --random_order--gpu_memory_fraction 0.25

the error appear

Traceback (most recent call last):
File "./align/align_dataset_mtcnn.py", line 35, in
import align.detect_face
ModuleNotFoundError: No module named 'align'

could you help me? thanks

Most helpful comment

this problem has been resolved.
copy the align_dataset_mtcnn.py to src and cmd change like that:
python ./align_dataset_mtcnn.py ./data/images --image_size 160--margin 32 --random_order--gpu_memory_fraction 0.25

good luck!

All 5 comments

this problem has been resolved.
copy the align_dataset_mtcnn.py to src and cmd change like that:
python ./align_dataset_mtcnn.py ./data/images --image_size 160--margin 32 --random_order--gpu_memory_fraction 0.25

good luck!

Hi Shiwenlin
thanks for your reply. but, I did what you said, like that:
D:\useful_codes\facenet-tensorflow-master\facenet-master\src>D:/Anaconda3/python.exe align_dataset_mtcnn.py ../data/images ../data/outimages --image_size 160 --margin 32 --random_order --gpu_memory_fraction 0.25
D:\Anaconda3\lib\site-packages\h5py__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Creating networks and loading parameters
Total number of images: 0
Number of successfully aligned images: 0


then i run real_time_face_recognition.py, but i sitll got the
import align.detect_face

ModuleNotFoundError: No module named 'align.detect_face'


could you help me to resolve that? thanks.
Edward

I am also facing the same issue... please help

have anyone fix the problem ModuleNotFoundError: No module named 'align.detect_face'

我也面臨同樣的問題......請幫助

i fix the problem
first u have to cd to facenet file
C:\facenet-master>
set PYTHONPATH=C:\facenet-master\src\align
or set PYTHONPATH=C:\facenet-master\src
note here you run real_time_face_recognition.py to C:\facenet-master\contributed>python real_time_face_recognition.py don"t set pythonpath here in C:\facenet-master\contributed
if you do it have same error ModuleNotFoundError:No module named 'align.detect_face'
do this real_time_face_recognition.py can run

Was this page helpful?
0 / 5 - 0 ratings