Reputation: 371
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 !
Upvotes: 1
Views: 189
Reputation: 2751
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
Upvotes: 2