Browse Source

some fixes about import statement

quarrying 3 years ago
parent
commit
06e77d4fd0
6 changed files with 8 additions and 11 deletions
  1. 2 2
      README.md
  2. 2 3
      khandy/image/misc.py
  3. 2 3
      khandy/utils_feature.py
  4. 0 1
      khandy/utils_others.py
  5. 1 1
      khandy/version.py
  6. 1 1
      setup.py

+ 2 - 2
README.md

@@ -11,7 +11,7 @@ pip install -e .
 
 
 ## Dependencies
-- Python 3.5 +
-- NumPy 1.11 +
+- Python 3.5+
+- NumPy 1.11+
 - OpenCV 2.0+
 

+ 2 - 3
khandy/image/misc.py

@@ -1,8 +1,7 @@
 import cv2
+import khandy
 import numpy as np
 
-from ..utils_numpy import minmax_normalize as _minmax_normalize
-
 
 def normalize_image_dtype(image, keep_num_channels=False):
     """Normalize image dtype to uint8 (usually for visualization).
@@ -22,7 +21,7 @@ def normalize_image_dtype(image, keep_num_channels=False):
     assert (image.ndim == 3 and image.shape[-1] in [1, 3]) or (image.ndim == 2)
 
     image = image.astype(np.float32)
-    image = _minmax_normalize(image, axis=None, copy=False)
+    image = khandy.minmax_normalize(image, axis=None, copy=False)
     image = np.array(image * 255, dtype=np.uint8)
     
     if not keep_num_channels:

+ 2 - 3
khandy/utils_feature.py

@@ -1,12 +1,11 @@
 from collections import OrderedDict
 
+import khandy
 import numpy as np
 
-from .utils_dict import get_dict_first_item as _get_dict_first_item
-
 
 def convert_feature_dict_to_array(feature_dict):
-    one_feature = _get_dict_first_item(feature_dict)[1]
+    one_feature = khandy.get_dict_first_item(feature_dict)[1]
     num_features = sum([len(item) for item in feature_dict.values()])
     
     key_list = []

+ 0 - 1
khandy/utils_others.py

@@ -1,7 +1,6 @@
 import time
 import socket
 import logging
-from collections import OrderedDict
 
 
 def print_with_no(obj):

+ 1 - 1
khandy/version.py

@@ -1,3 +1,3 @@
-__version__ = '0.1'
+__version__ = '0.1.2'
 
 __all__ = ['__version__']

+ 1 - 1
setup.py

@@ -5,7 +5,7 @@ install_requires = ['numpy>=1.11.1', 'opencv-python']
 
 setup(
     name='KHandy',
-    version='0.1.1',
+    version='0.1.2',
     description='Handy Utilities for Computer Vision',
     long_description='Handy Utilities for Computer Vision',
     keywords='computer vision',