Skip to content

Commit

Permalink
update to tensorflow 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
m-lyon committed Aug 15, 2021
1 parent e5abdc5 commit 06e92b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion face_compare/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def get_face(img):
'''Crops image to only include face plus a border'''
height, width, channels = img.shape
height, width, _ = img.shape
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
face_box = face_cascade.detectMultiScale(img)
# Get dimensions of bounding box
Expand Down
10 changes: 5 additions & 5 deletions face_compare/model.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import cv2
import numpy as np
import tensorflow as tf

import tensorflow.keras.backend as tfback

from pathlib import Path

from keras.layers import Conv2D, ZeroPadding2D, Activation, Input, concatenate
from keras.models import Model
from tensorflow.keras.layers import Conv2D, ZeroPadding2D, Activation, Input, concatenate
from tensorflow.keras.models import Model
from tensorflow.keras.layers import BatchNormalization
from keras.layers.pooling import MaxPooling2D, AveragePooling2D
from keras.layers.core import Lambda, Flatten, Dense
from tensorflow.keras.layers import MaxPooling2D, AveragePooling2D
from tensorflow.keras.layers import Lambda, Flatten, Dense

tfback.set_image_data_format('channels_first')

Expand Down
1 change: 0 additions & 1 deletion face_compare/weights/weights.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
import tensorflow as tf
from pathlib import Path


Expand Down
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from os import path
from setuptools import setup, find_packages

version = '1.0.2'
version = '1.1.0'
this_dir = path.abspath(path.dirname(__file__))
with open(path.join(this_dir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
Expand All @@ -22,10 +22,9 @@
license='MIT License',
packages=find_packages(),
install_requires=[
'numpy==1.18.0',
'tensorflow==2.3.1',
'keras==2.4.2',
'scipy==1.4.1',
'numpy',
'tensorflow==2.5.0',
'scipy',
'opencv-python'
],
classifiers=[
Expand Down

0 comments on commit 06e92b9

Please sign in to comment.