Skip to content

gabrielkirsten/pseudo_label_keras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pseudo-label with Keras

This is an implementation of the semi-supervised aproach called pseudo-label using Keras. This algorithm is based on article "Pseudo-Label : The Simple and Efficient Semi-Supervised Learning Method for Deep Neural Networks" by Dong-Hyun Lee (@donghyunlee).

warning: This project is under development! To report a problem, create an Issue

author: Gabriel Kirsten Menenezes (https://github.com/gabrielkirsten/)

Requirements:

You must Install:

  1. Python 2.7;
  2. Nvidia cuda libraries;
  3. Nvidia cuDCNN libraries;
  4. Tensorflow;
  5. Keras;
  6. Sklearn;
  7. h5py.

How to use:

usage: main.py [-h] [-a ARCHITECTURE [ARCHITECTURE ...]] [-f FINETUNINGRATE] -d DATASETPATH [-n NOLABELPERCENT [NOLABELPERCENT ...]]

optional arguments:

  -h, --help            show this help message and exit
  -a ARCHITECTURE [ARCHITECTURE ...], --architecture ARCHITECTURE [ARCHITECTURE ...]
                        Select architecture(Xception, VGG16, VGG19, ResNet50,
                        InceptionV3, MobileNet)
  -f FINETUNINGRATE, --fineTuningRate FINETUNINGRATE
                        Fine tuning rate
  -d DATASETPATH, --datasetPath DATASETPATH
                        Dataset location
  -n NOLABELPERCENT [NOLABELPERCENT ...], --noLabelPercent NOLABELPERCENT [NOLABELPERCENT ...]

Parameters:

Some parameters are defined at the main.py as:

  • Image width (IMG_WIDTH), Image height (IMG_HEIGHT) and Image channels (IMG_CHANNELS);
  • Supervised batch size (BATCH_SIZE);
  • Pseudo-label batch size (PSEUDO_LABEL_BATCH_SIZE);
  • Epochs (EPOCHS);
  • Class names (CLASS_NAMES).

Dataset Structure

./dataset-folder
├── no_label
|	└── no_label
|		└──your_unlabeled_images_here
├── test
|	├──your_class_1_here
|	:	└──your_class_1_images_here
|	└──your_class_n_here
|		└──your_class_n_images_here
├── train
|	├──your_class_1_here
|	:	└──your_class_1_images_here
|	└──your_class_n_here
|		└──your_class_n_images_here
└── validation
	├──your_class_1_here
	:	└──your_class_1_images_here
	└──your_class_n_here
		└──your_class_n_images_here

About

Implementation of the pseudo-label algorithm with keras

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published