Hi,
I have been trying to run facenet on my custom data set. When I try to run the align_dataset_mtcnn.py I get the error:
module 'facenet' has no attribute 'store_revision_info'
The error is occurring from Line 46: facenet.store_revision_info(src_path, output_dir, ' '.join(sys.argv)) of align_dataset_mtcnn.py
My OS: Ubuntu 16.04
Python: 3.6.4
TensorFlow: 1.8.0
store_revision_info works fine on a Windows10 OS. However on Ubuntu, it throws an error.
but how to resolve?
Make sure you don't have the parent folder of facenet repo directory on PYTHONPATH, you don't want the base folder facenet to be recognised as a module, you want it to use facenet/src/facenet.py where you have store_revision_info function.
You can check this by doing the following in the python terminal:
import sys
sys.path
I also encountered the same problem on a Windows10 OS 锛宎nd it has been solved.The reason is the path of facenet package is incorrect.I hope it can help you.
How did you solve it exactly?
I found path to parent folder in sys.path as per @MihaiTheCoder so I quit the terminal and opened another terminal and checked sys.path again and it did not contain any path related to facenet. After that I added path to src and src/align using export PYTHONPATH=$PYTHONPATH:
import facenet.src.facenet as facenet
import facenet.src.facenet as facenet
It's useful.
Most helpful comment
import facenet.src.facenet as facenet