Icon

23479_​03_​Fine-tune_​VGG16_​Python_​maybe_​repaired_​now

Fine-tune VGG16 (Python)

Instead of creating our own network architecture as in the previous workflow "Train simple CNN", in this workflow we use the pre-trained network architecture VGG16.

Please note: The workflow series is heavily inspired by the great blog-post of François Chollet (see https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html.)

1. Workflow 01 Preprocessing
2. Workflow 02 Trains simple CNN

3. Workflow 03 Fine-tune VGG16 Python: Instead of creating our own network architecture as in the previous workflow "Train simple CNN", in this workflow we use the pre-trained network architecture VGG16. (https://keras.io/applications/#vgg16, released by VGG (http://www.robots.ox.ac.uk/~vgg/research/very_deep/) at Oxford under the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/).

4. Workflow 04 Fine-tune VGG16

In order to run the example, please make sure you have the following KNIME extensions installed:

- KNIME Deep Learning - Keras Integration (Labs)
- KNIME Image Processing (Community Contributions Trusted)
- KNIME Image Processing - Deep Learning Extension (Community Contributions Trusted)
- KNIME Image Processing - Python Extension (Community Contributions Trusted)

You also need a local Python installation that includes Keras. Please refer to https://www.knime.com/deeplearning#keras for installation recommendations and further information.

KNIME Deep Learning - Classify Cats and Dogs In this series of workflows we want to demonstrate how to solve animage classification problem using KNIME Deep Learning - Kerasintegration.We want to train a model to distinguish cats and dogs on images. Limiting rows here, for more speed duringtesting (hopefully) @REM Save this a start script e.g. as "conda_python_keras_gpu_startscript.bat" on your computer@REM go to File -> Preferences -> KNIME ->"Python Deep Learning", set the conda environment handling to "manual" and point the keras path to this script@REM Adapt the folder in the PATH to your system@SET PATH=<PATH_WHERE_YOU_INSTALLED_ANACONDA>\Scripts;%PATH%@SET TF_FORCE_GPU_ALLOW_GROWTH=true@CALL activate py3_knime_keras_gpu || ECHO Activating python environment failed@python %* Training DataApply trainedmodel on test data.After 20 Epochs>= 0.5 is dogDownload network from Keras.Alternatively, you can also use theDL Keras Network Readerand load any other stored network.Replace layers.Fine-tune last convolutional.Table Reader(deprecated) DL Python NetworkExecutor Joiner (deprecated) Scorer (deprecated) Shuffle Partitioning Rule Engine Column Filter RowID Category To Number DL PythonNetwork Creator DL PythonNetwork Editor DL PythonNetwork Learner KNIME Deep Learning - Classify Cats and Dogs In this series of workflows we want to demonstrate how to solve animage classification problem using KNIME Deep Learning - Kerasintegration.We want to train a model to distinguish cats and dogs on images. Limiting rows here, for more speed duringtesting (hopefully) @REM Save this a start script e.g. as "conda_python_keras_gpu_startscript.bat" on your computer@REM go to File -> Preferences -> KNIME ->"Python Deep Learning", set the conda environment handling to "manual" and point the keras path to this script@REM Adapt the folder in the PATH to your system@SET PATH=<PATH_WHERE_YOU_INSTALLED_ANACONDA>\Scripts;%PATH%@SET TF_FORCE_GPU_ALLOW_GROWTH=true@CALL activate py3_knime_keras_gpu || ECHO Activating python environment failed@python %* Training DataApply trainedmodel on test data.After 20 Epochs>= 0.5 is dogDownload network from Keras.Alternatively, you can also use theDL Keras Network Readerand load any other stored network.Replace layers.Fine-tune last convolutional.Table Reader(deprecated) DL Python NetworkExecutor Joiner (deprecated) Scorer (deprecated) Shuffle Partitioning Rule Engine Column Filter RowID Category To Number DL PythonNetwork Creator DL PythonNetwork Editor DL PythonNetwork Learner

Nodes

Extensions

Links