From c728f1b0448f5bcddcb876194b8b544a085ea50c Mon Sep 17 00:00:00 2001 From: Hongyu Chiu <20734616+james77777778@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:06:10 +0800 Subject: [PATCH 1/3] Update `requirements.txt` and `pyproject.toml` --- pyproject.toml | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d98351c..6e898fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,13 +20,14 @@ authors = [{ name = "Hong-Yu Chiu", email = "james77777778@gmail.com" }] maintainers = [{ name = "Hong-Yu Chiu", email = "james77777778@gmail.com" }] readme = "README.md" requires-python = ">=3.9" -license = { file = "LICENSE" } +license = { text = "Apache License 2.0" } classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Operating System :: Unix", "Operating System :: MacOS", diff --git a/requirements.txt b/requirements.txt index 37576e8..f7a3bb9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ # "jax[cuda12_local]" # Following is for github runner -tf-nightly-cpu==2.16.0.dev20240101 +tensorflow-cpu==2.16.0rc0 # TODO: wait for TF 2.16 release --extra-index-url https://download.pytorch.org/whl/cpu torch>=2.1.0 From df20a20ca91467b53dcac98787eedc0bbeac214b Mon Sep 17 00:00:00 2001 From: Hongyu Chiu <20734616+james77777778@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:20:16 +0800 Subject: [PATCH 2/3] Update image url --- kimm/models/models_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kimm/models/models_test.py b/kimm/models/models_test.py index 6985283..d260538 100644 --- a/kimm/models/models_test.py +++ b/kimm/models/models_test.py @@ -378,7 +378,8 @@ def test_model_base_channels_last( backend.set_image_data_format("channels_last") model = model_class(weights=weights) image_path = keras.utils.get_file( - "african_elephant.jpg", "https://i.imgur.com/Bvro0YD.png" + "elephant.png", + "https://github.com/james77777778/keras-image-models/releases/download/0.1.0/elephant.png", ) # preprocessing image = utils.load_img(image_path, target_size=(image_size, image_size)) From f43378c9ca1a85285bef92f81f30256dc91c5539 Mon Sep 17 00:00:00 2001 From: Hongyu Chiu <20734616+james77777778@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:52:14 +0800 Subject: [PATCH 3/3] Minor fix --- kimm/models/base_model.py | 2 +- kimm/models/models_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kimm/models/base_model.py b/kimm/models/base_model.py index 3a3a0f7..6331361 100644 --- a/kimm/models/base_model.py +++ b/kimm/models/base_model.py @@ -225,7 +225,7 @@ def get_weights_url(self, weights): for _weights, _origin, _file_name in self.available_weights: if weights == _weights: - return f"{_origin}/{_file_name}" + return f"{_origin}{_file_name}" # Failed to find the weights _available_weights_name = [ diff --git a/kimm/models/models_test.py b/kimm/models/models_test.py index d260538..1883b80 100644 --- a/kimm/models/models_test.py +++ b/kimm/models/models_test.py @@ -412,7 +412,8 @@ def test_model_base_channels_first( backend.set_image_data_format("channels_first") model = model_class(weights=weights) image_path = keras.utils.get_file( - "african_elephant.jpg", "https://i.imgur.com/Bvro0YD.png" + "elephant.png", + "https://github.com/james77777778/keras-image-models/releases/download/0.1.0/elephant.png", ) # preprocessing image = utils.load_img(image_path, target_size=(image_size, image_size))