diff --git a/cvlib/face_detection.py b/cvlib/face_detection.py index 09f0c2c..c3b28a3 100644 --- a/cvlib/face_detection.py +++ b/cvlib/face_detection.py @@ -5,7 +5,7 @@ import cv2 import numpy as np import os -import pkg_resources +from pkg_resources import resource_filename, Requirement def detect_face(image, threshold=0.5): @@ -14,9 +14,10 @@ def detect_face(image, threshold=0.5): return None # access resource files inside package - prototxt = pkg_resources.resource_filename(__name__, os.path.sep + 'data' + os.path.sep + 'deploy.prototxt') - caffemodel = pkg_resources.resource_filename(__name__, - os.path.sep + 'data' + os.path.sep + 'res10_300x300_ssd_iter_140000.caffemodel') + prototxt = resource_filename(Requirement.parse('cvlib'), + 'cvlib' + os.path.sep + 'data' + os.path.sep + 'deploy.prototxt') + caffemodel = resource_filename(Requirement.parse('cvlib'), + 'cvlib' + os.path.sep + 'data' + os.path.sep + 'res10_300x300_ssd_iter_140000.caffemodel') # read pre-trained wieights net = cv2.dnn.readNetFromCaffe(prototxt, caffemodel) diff --git a/setup.py b/setup.py index f542da4..9b33965 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ from setuptools import setup setup(name='cvlib', - version='0.1.3', + version='0.1.5', description='A high level, easy to use, open source computer vision library for python', url='https://github.com/arunponnusamy/cvlib.git', author='Arun Ponnusamy', - author_email='arunponnusamy93@gmail.com', + author_email='hello@arunponnusamy.com', license='MIT', packages=['cvlib'], include_package_data=True,