Skip to content

Commit

Permalink
remove opencv ad dep
Browse files Browse the repository at this point in the history
  • Loading branch information
n3011 committed Mar 5, 2025
1 parent 1712e66 commit cade14a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions datum/utils/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ def check_and_image_shape(item: ValueType, shape: list) -> list:
if len(item.shape) > 0:
item = str(item[0])
if item.endswith(('.jpg', '.jpeg', '.png')):
import cv2
im = cv2.imread(item)
from PIL import Image
im = Image.open(item)
if im is not None:
return list(im.shape)
return list(np.asarray(im).shape)
return shape


Expand Down
2 changes: 1 addition & 1 deletion datum/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = '1.12.1'
__version__ = '1.12.2'
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# core lib dep
tensorflow <2.19
opencv-python==4.5.*
pillow >=9.2.0
absl-py>=0.10
tqdm>=4.39.0
wrapt>=1.14.1
Expand Down

0 comments on commit cade14a

Please sign in to comment.