-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from LielinJiang/dianbiao_contrib
Add mechanical meter to contrib
- Loading branch information
Showing
7 changed files
with
126 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
EVAL_CROP_SIZE: (2049, 1537) # (width, height), for unpadding rangescaling and stepscaling | ||
TRAIN_CROP_SIZE: (769, 769) # (width, height), for unpadding rangescaling and stepscaling | ||
AUG: | ||
AUG_METHOD: u"stepscaling" # choice unpadding rangescaling and stepscaling | ||
FIX_RESIZE_SIZE: (640, 640) # (width, height), for unpadding | ||
INF_RESIZE_VALUE: 500 # for rangescaling | ||
MAX_RESIZE_VALUE: 600 # for rangescaling | ||
MIN_RESIZE_VALUE: 400 # for rangescaling | ||
MAX_SCALE_FACTOR: 2.0 # for stepscaling | ||
MIN_SCALE_FACTOR: 0.5 # for stepscaling | ||
SCALE_STEP_SIZE: 0.25 # for stepscaling | ||
MIRROR: True | ||
RICH_CROP: | ||
ENABLE: False | ||
|
||
BATCH_SIZE: 2 | ||
MEAN: [0.5, 0.5, 0.5] | ||
STD: [0.5, 0.5, 0.5] | ||
|
||
DATALOADER: | ||
BUF_SIZE: 256 | ||
NUM_WORKERS: 4 | ||
DATASET: | ||
DATA_DIR: "./dataset/mini_mechanical_industry_meter_data/" | ||
IMAGE_TYPE: "rgb" # choice rgb or rgba | ||
NUM_CLASSES: 5 | ||
TEST_FILE_LIST: "./dataset/mini_mechanical_industry_meter_data/val_mini.txt" | ||
TEST_TOTAL_IMAGES: 8 | ||
TRAIN_FILE_LIST: "./dataset/mini_mechanical_industry_meter_data/train_mini.txt" | ||
TRAIN_TOTAL_IMAGES: 64 | ||
VAL_FILE_LIST: "./dataset/mini_mechanical_industry_meter_data/val_mini.txt" | ||
VAL_TOTAL_IMAGES: 8 | ||
SEPARATOR: "|" | ||
IGNORE_INDEX: 255 | ||
|
||
FREEZE: | ||
MODEL_FILENAME: "__model__" | ||
PARAMS_FILENAME: "__params__" | ||
MODEL: | ||
MODEL_NAME: "unet" | ||
DEFAULT_NORM_TYPE: "bn" | ||
TEST: | ||
TEST_MODEL: "./saved_model/unet_mechanical_meter/final/" | ||
TRAIN: | ||
MODEL_SAVE_DIR: "./saved_model/unet_mechanical_meter/" | ||
PRETRAINED_MODEL_DIR: "./pretrained_model/unet_bn_coco/" | ||
SNAPSHOT_EPOCH: 10 | ||
SOLVER: | ||
NUM_EPOCHS: 100 | ||
LR: 0.001 | ||
LR_POLICY: "poly" | ||
OPTIMIZER: "sgd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License" | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import sys | ||
import os | ||
|
||
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) | ||
TEST_PATH = os.path.join(LOCAL_PATH, "..", "test") | ||
sys.path.append(TEST_PATH) | ||
|
||
from test_utils import download_file_and_uncompress | ||
|
||
|
||
def download_deepglobe_road_dataset(savepath, extrapath): | ||
url = "https://paddleseg.bj.bcebos.com/dataset/mini_mechanical_industry_meter_data.zip" | ||
download_file_and_uncompress( | ||
url=url, savepath=savepath, extrapath=extrapath) | ||
|
||
|
||
if __name__ == "__main__": | ||
download_deepglobe_road_dataset(LOCAL_PATH, LOCAL_PATH) | ||
print("Dataset download finish!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters