Keras28Models Package for Transfer Learning

Keras28 Models This is my Python package for easy build deep learning applications by using transfer learning pre trainined 28 models in easy few line code. to avoid wasting time scripting in your deep learning

photo from splash


The training of the Keras28Models Package will be on Google Colab because it was previously prepared for all training libraries deep learning and away from the problems of installation troublesome libraries. and i’m using and test it for chest X-Ray Pneumonia dataset from kaggle .step by step and u must load kaggle.json API For your account to get and full access X-Ray images dataset…i will explain it in small script to load it


load and install package in colab

!pip install Keras28Models==0.1.0


load and install kaggle libraries and module

!pip install -q kaggle


load kaggle.json from API account to access full dataset

! mkdir ~/.kaggle
! cp kaggle.json ~/.kaggle/
!chmod 600 ~/.kaggle/kaggle.json


load dataset from kaggle

!kaggle datasets download -d paultimothymooney/chest-xray-pneumonia


unzip compressed dataset from zip file

!unzip /content/


load keras28models library to training your custom dataset in quickly script code and few Initialization parameter for training models.

from keras28models import models28 as k28m
batch_size=32 # batch size for custom dataset
train_path=’/content/chest_xray/chest_xray/train’ # path for training dataset
valid_path=’/content/chest_xray/chest_xray/val’ # path for validation dataset
num_class=2 # class number here for chest x-ray diseses NORMAL or PNEUMONIA
epochs=2 #epoch number for traiing


call function to training dataset into 28 models in one code


full script

from keras28models import models28 as k28m
spreadsheet file contain model name ,model parameters and validation accuracy
graph for all models Accuracy vs Model Size

Developer Programmer, in Python and deep learning. IOT Microcontroller Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store