Browse Source

new version. added different types of surrogates

Dimitri Korsch 5 years ago
parent
commit
8cbc0864a2
3 changed files with 6 additions and 3 deletions
  1. 1 1
      cvdatasets/_version.py
  2. 3 0
      cvdatasets/dataset/part/surrogate.py
  3. 2 2
      setup.py

+ 1 - 1
cvdatasets/_version.py

@@ -1 +1 @@
-__version__ = "0.5.4"
+__version__ = "0.6.0"

+ 3 - 0
cvdatasets/dataset/part/surrogate.py

@@ -13,10 +13,13 @@ class SurrogateType(enum.Enum):
 	def __call__(self, im, w, h, dtype=np.uint8):
 		if self is SurrogateType.BLANK:
 			return self._blank(im, w, h, dtype=dtype)
+
 		elif self is SurrogateType.IMAGE:
 			return self._image(im, w, h, dtype=dtype)
+
 		elif self is SurrogateType.MIDDLE:
 			return self._middle(im, w, h, dtype=dtype)
+
 		else:
 			raise ValueError("Unknown surrogate method: {}".format(self))
 

+ 2 - 2
setup.py

@@ -11,11 +11,11 @@ pkg_name = "cvdatasets"
 
 cwd = Path(__file__).parent.resolve()
 # Get __version__ variable
-exec(open(cwd / pkg_name / '_version.py').read())
+exec(open(str(cwd / pkg_name / '_version.py')).read())
 
 install_requires = [
 	line.strip()
-		for line in open(cwd / "requirements.txt").readlines()
+		for line in open(str(cwd / "requirements.txt")).readlines()
 ]
 
 setup(