Skip to content

Releases: bhky/opennsfw2

0.14.0

18 Aug 10:07
Compare
Choose a tag to compare
  • Support parsing PIL.Image.Image object(s) directly other than image path(s) to predict_image and predict_images functions. Rename the original image_path/image_paths position arg to image_handle/image_handles (breaking change).
  • Add Python 3.12 to CI test.

0.13.10

12 Aug 10:27
Compare
Choose a tag to compare
  • Fix image overlay for GradCAM when using YAHOO preprocessing. The YAHOO preprocessing actually excludes from the model input certain pixels from each edge of the image, the GradCAM visualisation should take this into account.

0.13.9

19 Jul 12:16
Compare
Choose a tag to compare
  • Fix type annotation for PIL.Image.Image.
  • Use a fixed layer name global_average_pooling2d for the GlobalAveragePooling2D layer, to avoid Keras assigning a different name upon multiple model instantiations.

0.13.7

28 Dec 02:11
Compare
Choose a tag to compare
  • For Keras 2 compatibility, a generic type var KerasTensor is defined instead of using keras.KerasTensor directly, as the latter is only available in Keras 3.
  • Relax version requirement for Keras in setup config

0.13.4

21 Dec 08:08
Compare
Choose a tag to compare
  • Allow passing a model name to the make_open_nsfw_model function. This will be used as the name attribute of the returned Keras model object. The default name is opennsfw2.
  • Fix logic for updating the internal global model variable.

0.13.2

21 Dec 02:57
Compare
Choose a tag to compare
  • Use Keras 3 instead of Keras Core
  • Drop support for Python 3.8; add support for Python 3.11

0.12.1

07 Dec 01:51
Compare
Choose a tag to compare
  • Improve internal batching logic for predicting from image paths.

0.12.0

02 Dec 03:57
Compare
Choose a tag to compare
  • Improve support for using the APIs in a loop, in particular, reduce the memory usage due to re-creating the model object.

0.11.0

05 Aug 05:13
Compare
Choose a tag to compare
  • Switch from tf.keras to keras_core
  • Include test run for JAX backend
  • Update README
  • Other minor fixes

0.10.2

18 Oct 09:48
Compare
Choose a tag to compare
  • Fixed model inference usage to avoid potential TF mem-leak