From 812649504118da37f3d33d760c62905d2a96c6bc Mon Sep 17 00:00:00 2001 From: fregu856 Date: Thu, 27 Sep 2018 15:58:53 +0200 Subject: [PATCH] > --- datasets.py | 2 +- eval_on_val.py => evaluation/eval_on_val.py | 8 +++++++- .../eval_on_val_for_metrics.py | 8 +++++++- aspp.py => model/aspp.py | 0 deeplabv3.py => model/deeplabv3.py | 0 resnet.py => model/resnet.py | 0 train.py | 7 ++++++- preprocess_data.py => utils/preprocess_data.py | 0 random_code.py => utils/random_code.py | 0 utils.py => utils/utils.py | 0 run_on_seq.py => visualization/run_on_seq.py | 8 +++++++- run_on_thn_seq.py => visualization/run_on_thn_seq.py | 8 +++++++- 12 files changed, 35 insertions(+), 6 deletions(-) rename eval_on_val.py => evaluation/eval_on_val.py (95%) rename eval_on_val_for_metrics.py => evaluation/eval_on_val_for_metrics.py (95%) rename aspp.py => model/aspp.py (100%) rename deeplabv3.py => model/deeplabv3.py (100%) rename resnet.py => model/resnet.py (100%) rename preprocess_data.py => utils/preprocess_data.py (100%) rename random_code.py => utils/random_code.py (100%) rename utils.py => utils/utils.py (100%) rename run_on_seq.py => visualization/run_on_seq.py (96%) rename run_on_thn_seq.py => visualization/run_on_thn_seq.py (96%) diff --git a/datasets.py b/datasets.py index b3440cc..d7d19a3 100644 --- a/datasets.py +++ b/datasets.py @@ -1,4 +1,4 @@ -# camera-ready +# camera-ready if everything works import torch import torch.utils.data diff --git a/eval_on_val.py b/evaluation/eval_on_val.py similarity index 95% rename from eval_on_val.py rename to evaluation/eval_on_val.py index cb34e83..cd1101d 100644 --- a/eval_on_val.py +++ b/evaluation/eval_on_val.py @@ -1,8 +1,14 @@ -# camera-ready +# camera-ready if everything works +import sys + +sys.path.append("/root/deeplabv3") from datasets import DatasetVal # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason) + +sys.path.append("/root/deeplabv3/model") from deeplabv3 import DeepLabV3 +sys.path.append("/root/deeplabv3/utils") from utils import label_img_to_color import torch diff --git a/eval_on_val_for_metrics.py b/evaluation/eval_on_val_for_metrics.py similarity index 95% rename from eval_on_val_for_metrics.py rename to evaluation/eval_on_val_for_metrics.py index 106bb86..93ccfe4 100644 --- a/eval_on_val_for_metrics.py +++ b/evaluation/eval_on_val_for_metrics.py @@ -1,8 +1,14 @@ -# camera-ready +# camera-ready if everything works +import sys + +sys.path.append("/root/deeplabv3") from datasets import DatasetVal # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason) + +sys.path.append("/root/deeplabv3/model") from deeplabv3 import DeepLabV3 +sys.path.append("/root/deeplabv3/utils") from utils import label_img_to_color import torch diff --git a/aspp.py b/model/aspp.py similarity index 100% rename from aspp.py rename to model/aspp.py diff --git a/deeplabv3.py b/model/deeplabv3.py similarity index 100% rename from deeplabv3.py rename to model/deeplabv3.py diff --git a/resnet.py b/model/resnet.py similarity index 100% rename from resnet.py rename to model/resnet.py diff --git a/train.py b/train.py index b8b64dd..9dfb85f 100644 --- a/train.py +++ b/train.py @@ -1,8 +1,13 @@ -# camera-ready +# camera-ready if everything works + +import sys from datasets import DatasetTrain, DatasetVal # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason) + +sys.path.append("/root/deeplabv3/model") from deeplabv3 import DeepLabV3 +sys.path.append("/root/deeplabv3/utils") from utils import add_weight_decay import torch diff --git a/preprocess_data.py b/utils/preprocess_data.py similarity index 100% rename from preprocess_data.py rename to utils/preprocess_data.py diff --git a/random_code.py b/utils/random_code.py similarity index 100% rename from random_code.py rename to utils/random_code.py diff --git a/utils.py b/utils/utils.py similarity index 100% rename from utils.py rename to utils/utils.py diff --git a/run_on_seq.py b/visualization/run_on_seq.py similarity index 96% rename from run_on_seq.py rename to visualization/run_on_seq.py index bac94ef..566df08 100644 --- a/run_on_seq.py +++ b/visualization/run_on_seq.py @@ -1,8 +1,14 @@ -# camera-ready +# camera-ready if everything works +import sys + +sys.path.append("/root/deeplabv3") from datasets import DatasetSeq # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason) + +sys.path.append("/root/deeplabv3/model") from deeplabv3 import DeepLabV3 +sys.path.append("/root/deeplabv3/utils") from utils import label_img_to_color import torch diff --git a/run_on_thn_seq.py b/visualization/run_on_thn_seq.py similarity index 96% rename from run_on_thn_seq.py rename to visualization/run_on_thn_seq.py index ef356dc..77a6cc9 100644 --- a/run_on_thn_seq.py +++ b/visualization/run_on_thn_seq.py @@ -1,8 +1,14 @@ -# camera-ready +# camera-ready if everything works +import sys + +sys.path.append("/root/deeplabv3") from datasets import DatasetThnSeq # (this needs to be imported before torch, because cv2 needs to be imported before torch for some reason) + +sys.path.append("/root/deeplabv3/model") from deeplabv3 import DeepLabV3 +sys.path.append("/root/deeplabv3/utils") from utils import label_img_to_color import torch