From 4f3f26471e6feb63a6534a29838aa19f190a3f2d Mon Sep 17 00:00:00 2001
From: Victor Joos <victor.joos@uclouvain.be>
Date: Tue, 28 Jun 2022 15:03:24 +0200
Subject: [PATCH] Segmentation task

---
 hydra_flash/conf/datamodule/lyft.yaml      |  8 ++++++++
 hydra_flash/conf/datamodule/lyft_test.yaml |  6 ++++++
 hydra_flash/conf/experiment/lyft.yaml      | 13 +++++++++++++
 hydra_flash/conf/model/seg_mobilenet.yaml  |  5 +++++
 hydra_flash/conf/preprocess/lyft.yaml      |  4 ++++
 5 files changed, 36 insertions(+)
 create mode 100644 hydra_flash/conf/datamodule/lyft.yaml
 create mode 100644 hydra_flash/conf/datamodule/lyft_test.yaml
 create mode 100644 hydra_flash/conf/experiment/lyft.yaml
 create mode 100644 hydra_flash/conf/model/seg_mobilenet.yaml
 create mode 100644 hydra_flash/conf/preprocess/lyft.yaml

diff --git a/hydra_flash/conf/datamodule/lyft.yaml b/hydra_flash/conf/datamodule/lyft.yaml
new file mode 100644
index 0000000..26e2b3b
--- /dev/null
+++ b/hydra_flash/conf/datamodule/lyft.yaml
@@ -0,0 +1,8 @@
+_target_: flash.image.SemanticSegmentationData.from_folders
+train_folder: "${preprocess.path}/CameraRGB"
+train_target_folder: "${preprocess.path}/CameraSeg"
+val_split: 0.1
+transform_kwargs:
+  image_size: [256, 256]
+num_classes: 21
+batch_size: 4
diff --git a/hydra_flash/conf/datamodule/lyft_test.yaml b/hydra_flash/conf/datamodule/lyft_test.yaml
new file mode 100644
index 0000000..ea649de
--- /dev/null
+++ b/hydra_flash/conf/datamodule/lyft_test.yaml
@@ -0,0 +1,6 @@
+_target_: flash.image.SemanticSegmentationData.from_files
+predict_files:
+  - "${preprocess.path}/CameraRGB/F61-1.png"
+  - "${preprocess.path}/CameraRGB/F62-1.png"
+  - "${preprocess.path}/CameraRGB/F63-1.png"
+batch_size: 3
diff --git a/hydra_flash/conf/experiment/lyft.yaml b/hydra_flash/conf/experiment/lyft.yaml
new file mode 100644
index 0000000..b12d382
--- /dev/null
+++ b/hydra_flash/conf/experiment/lyft.yaml
@@ -0,0 +1,13 @@
+# @package _global_
+defaults:
+  - _self_
+  - /server: local
+  - /preprocess: lyft
+  - /datamodule: lyft
+  - /model: seg_mobilenet
+  - /datamodule@predict_datamodule: lyft_test
+
+trainer:
+  _target_: flash.Trainer
+  max_epochs: 3
+  gpus: 1
diff --git a/hydra_flash/conf/model/seg_mobilenet.yaml b/hydra_flash/conf/model/seg_mobilenet.yaml
new file mode 100644
index 0000000..bc512ff
--- /dev/null
+++ b/hydra_flash/conf/model/seg_mobilenet.yaml
@@ -0,0 +1,5 @@
+_target_: flash.image.SemanticSegmentation
+backbone: "mobilenetv3_large_100"
+head: fpn
+num_classes: ${datamodule.num_classes}
+complete: []
diff --git a/hydra_flash/conf/preprocess/lyft.yaml b/hydra_flash/conf/preprocess/lyft.yaml
new file mode 100644
index 0000000..63a8fe6
--- /dev/null
+++ b/hydra_flash/conf/preprocess/lyft.yaml
@@ -0,0 +1,4 @@
+defaults:
+  - download
+
+url: "https://github.com/ongchinkiat/LyftPerceptionChallenge/releases/download/v0.1/carla-capture-20180513A.zip"
-- 
GitLab