facenet
facenet copied to clipboard
Get AttributeError: 'int' object has no attribute 'value' when run align_dataset_mtcnn.py
Hi all
I want to align my dataset however when I run
-python src/align/align_dataset_mtcnn.py
~/dataset/raw/
~/dataset/preprocess
--image_size 182
--margin 44
I get error 'int' object has no attribute 'value' at line feed_in, dim = (inp, input_shape[-1].value) in face_detect.py
Can someone point out to me. Thanks
Hi all I want to align my dataset however when I run -python src/align/align_dataset_mtcnn.py ~/dataset/raw/ ~/dataset/preprocess --image_size 182 --margin 44 I get error 'int' object has no attribute 'value' at line feed_in, dim = (inp, input_shape[-1].value) in face_detect.py Can someone point out to me. Thanks
same problem
Python 3.8, tensorflow-gpu=2.2.0, tensorflow-cpu=2.3.0, , cuda=10.1,cudnn= 10.1
- remove the value, feed_in, dim = (inp, input_shape[-1])
- import tensorflow.compat,v1 as tf # ingore the red warning,
- import imageio, to replace misc.imread() as format: imageio.imread(os.path.join(emb_dir, i))
- import from PIL import Image , to replace misc.resize as format : aligned = np.array(Image.fromarray(temp_crop).resize((image_size, image_size)))
- os.environ["TF_CPP_MIN_LOG_LEVEL"] = '3' # ingore wraning os.environ["CUDA_VISIBLE_DEVICES"] = "0, 1," # , 1 =CPU, 0 =GPU tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) tf.compat.v1.disable_eager_execution() config = tf.compat.v1.ConfigProto() config.gpu_options.allow_growth = True # session = tf.compat.v1.Session(config=config) #setting session KTF.set_session(sess)
- detect_face.py, #88 row, replace as format: data_dict = np.load(data_path, encoding='latin1', allow_pickle=True).item()
- tensorflow.compat,v1
it works, thx!