Code Monkey home page Code Monkey logo

cls_melanoma's Introduction

cls_Melanoma

Two-stage Deep Neural Network via Ensemble Learning for Melanoma Classification

image-20211030213156848

In this study, we propose an ensemble method that can integrate different types of classification networks for melanoma classification. Specifically, we first use U-net to segment the lesion area of images to generate a lesion mask, thus resize images to focus on the lesion; then, we use five excellent classification models to classify dermoscopy images, and adding squeeze-excitation block (SE block) to models to emphasize the informative features; finally we use our proposed new ensemble network to integrate five different classification results. The experimental results prove the validity of ourresults. We test our method on the ISIC 2017 challenge dataset, and obtain excellent results on multiple metrics, especially, we get 0.909 on ACC.

Data

https://challenge.isic-archive.com/data/#2017

Segmentation

# segment training data
python seg_train.py

# segment testing data
python seg_predict.py

Resize

resize.py

Training

python training.py

# choose the network that you want to train here
# backbone_name = 'resnet50'
# backbone_name = 'densenet169'
backbone_name = 'inception_v3'
# backbone_name = 'inception_resnet_v2'
# backbone_name = 'xception'

Predict

python cls_predict.py

# you should also specify the network name

Vote

python vote.py

# training and testing

# network structure

inputs = keras.Input(shape=train_preds.shape[1:]) # 150x3x5
model = LocallyConnected1D(20, 1, activation='relu')(inputs) # 150x3x3
model = LocallyConnected1D(1, 1, activation='sigmoid')(model) # 150x3x1
model = keras.layers.Flatten()(model)
output = keras.layers.Softmax()(model)
model = keras.Model(inputs=inputs, outputs=output)

model.compile(optimizer=Adam(lr=0.001), metrics=['accuracy'], loss='categorical_crossentropy')
model.summary()
model.fit(train_preds, label, epochs=20, validation_data=(val_preds, label_val))

model.save(os.path.join(model_data_dir, 'votetry.h5'))

Results

Classification results with or without segmentation

image-20211030213156848

Two classification challenges

image-20211030213156848

Compare with others

image-20211030213423575

cls_melanoma's People

Contributors

jq-ding avatar

Watchers

 avatar

cls_melanoma's Issues

有关models文件夹下少backbone

尊敬的作者,您好:
我是一名江苏大学的研究生,最近有用到您的代码,但是您的代码“training.py”中"from models import backbone"报错,并且查看了您models文件夹下的内容,发现好像少了backbone文件,请问您是否方便将backbone文件添加上去呢?期待您的回信,万分感谢!

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.