Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 1.84 KB

README.md

File metadata and controls

97 lines (65 loc) · 1.84 KB

MSFFNet

Semantic Segmentation of Agricultural Crop Multispectral Image Using Feature Fusion

This repository contains the code for my paper: Semantic Segmentation of Agricultural Crop Multispectral Image Using Feature Fusion .

Custom dataset

Due to circumstances, we are unable to provide our own dataset. sorry.

DATA-DIR

<dataset>
│
├── rgb               # rgb images
│   ├── image_1.JPG
│   ├── image_2.JPG
│   └── ...
│
├── etc multispectral  # another multispectral images dic ex) blue, green, nir, re ---
│   ├── image_1.TIF
│   ├── image_2.TIF
│   └── ...
│
├── labels             # label images
│   ├── image_1.png
│   ├── image_2.png
│   └── ...
│
├── train.txt          
└── test.txt           # Train-test split.

<train.txt>
image_1
image_2
...

<test.txt>
...
image_n-1
image_n

We used ndvi as the name of the etc multispectral folder and used the TIF image as the dataset.

In the getitem function of class MF_dataset in MF_dataset.py, change the folder name and extension name to suit your dataset.

Getting started

This code was tested on linux and requires:

  • Python 3.8
  • conda3 or miniconda3
  • CUDA capable GPU (one is enough)

1. Setup environment

conda create --name <your env name> --file environment.yml

2. Run

Train

python train.py

The results will be rendered and put in ./runs/

Inference

python inference.py

The results will be rendered and put in ./result/

Inference example