ResNet50 on multi-spectral image segmentation

Is there a way to use any pretrain network (not necessarily Resnet) to segment multispectral images in MATLAB?

deeplabv3plusLayers

only allows [height width 3] or [height width] input images. While I tried bypassing the error deeplabv3plusLayers returns, when I used trainNetwork I get an error referring to the wrong input data 224x224xN.

Can the first convolutional layer of the pretrained network be replaced to process more than 3 channels?

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

You can copy the layerGraph of the pretrained network and change the imageInputLayer, the first convolutionLayer to match the input image channel dimension & convolution filter dimensions. Then you can freeze/unfreeze the existing pretrained weights during training the new network accordingly.

You can do something like below:(N=50)

imageSize = [224 224 3];% Specify the number of classes.
numClasses = 10;
N = 50;
% Create DeepLab v3+.
lgraph = deeplabv3plusLayers(imageSize, numClasses, "resnet50");
analyzeNetwork(lgraph)
layers = lgraph.Layers
%%
newlgraph = replaceLayer(lgraph,'input_1',imageInputLayer([224 224 N],'Name','input'));
newlgraph = replaceLayer(newlgraph,'conv1',convolution2dLayer(7,64,'stride',[2 2],'padding',[3 3 3 3],'Name','conv1'))
analyzeNetwork(newlgraph)

SEE COMPLETE ANSWER CLICK THE LINK

--

--

--

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Detection Of Pneumonia From Chest X-Ray Images

Identify the correct dataset for your ML Algorithms(Supervised)

Create a Machine Learning Model and Integrate into Your IOS App

Actor-Critic: Implementing Actor-Critic Methods

Machine Learning — Overview #1

A Practical Guide to Person Re-Identification Using AlignedReID

Lifespan Age Transformation Synthesis

How to Diagnose Parkinson’s Disease by Voice Using Linear Regression in Python

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
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

More from Medium

No of Pipeline Stages in Verilog coming from an m file (or latency)

Adaboost classifier for face detection using viola jones algorithm

Part 1: Python and DICOM: Two easy tools to save time and energy when working with medical images…

Machine Learning …Definitions And Appl