Skip to content

FlorianDelconte/uNet_reliefmap

Repository files navigation

uNet_reliefmap

Train k-models with our reliefMap. alt text

DATA

In 'dbRelief' they are all reliefMap and labeled image for train u-net (suffixed by '_GT'). They are generated using this repository : https://github.com/FlorianDelconte/TLDDC.git In 'dbRelief/test/' they are reliefMap for testing u-net after training.

DEPENDENCIES

install tensorflow/openCV/tensorflow addon in virtual env via pip :

sudo apt update
sudo apt install python3-dev python3-pip python3-venv
python3 -m venv --system-site-packages ./venv
source ./venv/bin/activate
pip install --upgrade pip
pip install --upgrade tensorflow==2.6
pip install tensorflow-addons==0.14
pip install opencv-python==4.5.3.56
pip install -U scikit-learn==1.0.1

TRAIN u-net with our DATA

The first step is to extract thumbnails of size 320*320 from the reliefMap. We made a bash/python script for that. Here is the command to extract the training pairs and distribute them in dbRelief/thumbnail/examples/ and dbRelief/thumbnail/labels/. . Warning : You have to respect the folder naming because they are hardcoded in "kfold_split.py" and "train_kfold.py".

./train-valid_cut_All.sh dbRelief/ dbRelief/thumbnails/

we allow the user to do a cross validation with 5 fold. The second step is to distribute the data in the 5 folds. Here is the command to do that:

python3 kfold_split.py

Finaly train the 5 models with this command :

python3 train_kfold.py

TEST u-net with test DATA

You can test models with this command :

python3 predict.py pathToReliefMapTest PathToModel treshold

About

Train a u-net with Reliefmap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published