Skip to content

Implementation for paper MLP-Mixer: An all-MLP Architecture for Vision. MLP-Mixer, an architecture based exclusively on multi-layer perceptrons (MLPs). MLP-Mixer contains two types of layers: one with MLPs applied independently to image patches (i.e. "mixing" the per-location features), and one with MLPs applied across patches (i.e. "mixing" spa…

Notifications You must be signed in to change notification settings

qlinhta/MLP-Mixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation for paper MLP-Mixer: An all-MLP Architecture for Vision

Architecture

Set up dataset.

Create 2 folders train and validation in the data folder (which was created already). Then Please copy your images with the corresponding names into these folders.

  • train folder was used for the training process
  • validation folder was used for validating training result after each epoch

This library use image_dataset_from_directory API from Tensorflow 2.0 to load images.

Train model

python train.py --epochs ${epochs} --num-classes ${num_classes}
python train.py --epochs 10 --num-classes 2

Testing model

python predict.py --test-file-path ${test_file_path}

where test_file_path is the path of your test image.

Example:

python predict.py --test-file-path ./data/test/Image.jpg

About

Implementation for paper MLP-Mixer: An all-MLP Architecture for Vision. MLP-Mixer, an architecture based exclusively on multi-layer perceptrons (MLPs). MLP-Mixer contains two types of layers: one with MLPs applied independently to image patches (i.e. "mixing" the per-location features), and one with MLPs applied across patches (i.e. "mixing" spa…

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages