Coder Social home page Coder Social logo

slc_chen's Introduction

๐Ÿ”ฌSLC Chen

Skin Lesion Classification framework based on Keras.

็šฎ่‚ค้•œๅ›พๅƒ็—…็†ๅˆ†็ฑปๆก†ๆžถใ€‚

Introduction ๐Ÿ’ก

SLC is an KERAS framework for large-scale deep learning experiments. It feautres in simple usage and convinient experienments tracking.

One-click Usage ๐Ÿงฏ

The main idea of the project is that the deep-learning experiment include two modules: process control and model control. You can train model as simple as:

exp = ProcessControl('config_file')
model = ModelControl('config_file')
exp.train(mc)

All-in-one config file. As in above pseudo-code, config_file is an all-in-one config of the training pipeline, model design, data processing and evaluation.

Detail Usage ๐Ÿ•น

A simple classification exp to show the power of SLC.

Pre-Settings

  1. Run ./environment_set.sh in the path where you want the SLC_chen project be placed.

    E.g. in path home/user/, the script will:

    1. create file structure into home/user/SLC_chen/

    2. download and unzip the dataset to home/user/SLC_chen/dataset/128_128

      **notice:

      • You can choose what dataset size to use in script
      • Original images didn't provided with download link cause its too huge
  2. Move into dir SLC_chen/experiment_space/, and do your experiments.

SkinLesionClassify()

Class SkinLesionClassify() is for process control. The class takes control of high level oprations in deep learning experiments.

Class SkinLesionClassify control the below process:

  • Prepare data
  • Set workpaths
  • Data generate
  • Feed into training or validation
  • Get scores
  • Save necessary intermediate data
  • Save checkpoint
  • Create log

The whole training process is as simple as

import SkinLesionClassify
slc = SkinLesionClassify.SkinLesionClassify()
slc.train()

But in the process, there are so many parameters that too trivial to log. Thus for control and reproduce, all configurable parameters are loaded from .conf file when init the SkinLesionClassify class like this:

**notice: .conf file must be provided.

config_file = "./SLC.conf"
slc = SkinLesionClassify.SkinLesionClassify(config_file)

You can take a look of .conf file in code/SLC_template.conf. It listed all parameters can be changed.

SLCModel

Class SLCModel() is for model control. The class has a Keras.model() object as main part.

SLCModel() can do:

  • Load metrics and loss
  • Compile Keras model object
  • Change model

The model control is as:

import SLC_models
slc_model = SLC_models.SLCModel('config_file')
slc_model.loadModel('model_name', **kwargs)

For elastic change of model object, here is the only **kwargs didn't zipped in config file. In one set of similar experiments, the **kwargs may be the most frequently changed parameter, but don't worry, it will be saved into a log file part from config_file.

Example

import SkinLesionClassify
import SLC_models

config_file = "./SLC.conf"
slc = SkinLesionClassify.SkinLesionClassify(config_file)
slc.resizeImages()
slc_model = SLC_models.SLCModel(config_file)
slc_model.loadModel('resnet_v1', depth = 20)
slc.train(slc_model)
slc.evaluation(slc_model)

Notice โ›”๏ธ

  • /code folder should be more stastic and .gitignore file will ignore tracking operations in /experiment_space
  • data files can be orgnized like:
    • /dataset/HAM10000_metadata.csv,/origin,/resized_{}_{}

slc_chen's People

Contributors

doem97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.