1

I am naive to python and this is my first attempt so please bear with me if my question seems to be too basic. I would like to use convolutional neural network to perform semantic segmentation to 9 satellite images. I have so far been successful in importing the images one by one and converting them to grayscale.

I would like to do the following process :

convolution- 16 filters, 33 filter size pooling- 22 filter size output- 4 classes testing and validation 80:20

any lead on this could be helpful. kindly guide !

0

1 Answer 1

2

Here is the code, only the model part:

import tensorflow as tf
from tensorflow.keras import Conv2D, Dense, Flatten, MaxPool2D

# Declare your desired things here
num_filter=32
kernel_size=(3,3)
strides=(1,1)
padding="valid"
input_shape=(width,height,channel)

model = tf.keras.Sequential([
   Conv2D(num_filter, kernel_size, strides=strides, input_shape=input_shape),
   MaxPool2D(),
   Flatten(),
   Dense(4, activation="softmax")
])

Here is a useful link: ConvNet TensorFlow guide

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you so much! Kindly guide. where can I enter my input images ?
You can use model.fit(x_train, y_train...), in the link there is also the tutorial.
If you find my answer is acceptable, consider stackoverflow.com/help/someone-answers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.