• 大小: 0.10M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-05-11
  • 语言: Python
  • 标签: tensorflow  DeepLabV3  

资源简介

语义分割模型

图像分割领域的当前非常好的模型deeplabv3

资源截图

代码片段和文件信息

import sys
import os

import argparse
import numpy as np

IMG_MEAN = np.array((104.00698793116.66876762122.67891434) dtype=np.float32)

BATCH_SIZE = 4
BN_WEIGHT_DECAY = 0.9997
CKPT = 0
DATA_DIRECTORY = ‘/storage/ndong/data/auto/VOC/VOCdevkit/VOC2012‘
DATA_NAME = ‘VOC12‘
IGNORE_LABEL = 255
IMAGENET = ‘./data/pretrained_models‘
INPUT_SIZE = 513
LEARNING_RATE = 0.01
MOMENTUM = 0.9
NUM_CLASSES = 21
NUM_GPUS = 1
NUM_layerS = 101
NUM_STEPS = 600000
NUM_TRAIN = 10582
NUM_VAL = 1449
POWER = 0.9
RANDOM_SEED = 1234
RESTORE_FROM = None
SAVE_NUM_IMAGES = 1
SAVE_PRED_EVERY = 1000
SNAPSHOT_DIR = ‘./snapshots‘
SPLIT_NAME = ‘train‘
WEIGHT_DECAY = 1e-4

parser = argparse.ArgumentParser(description=“DeepLabV3“)
parser.add_argument(“--batch-size“ type=int default=BATCH_SIZE
                    help=“Number of images sent to the network in one step.“)
parser.add_argument(“--bn-weight-decay“ type=float default=BN_WEIGHT_DECAY
                    help=“Regularisation parameter for batch norm.“)
parser.add_argument(“--ckpt“ type=int default=CKPT 
                    help=“Checkpoint to restore.“)
parser.add_argument(“--data-dir“ type=str default=DATA_DIRECTORY
                    help=“Path to the directory containing the PASCAL VOC dataset.“)
parser.add_argument(“--data-name“ type=str default=DATA_NAME
                    help=“Name of the dataset.“)
parser.add_argument(“--freeze-bn“ action=“store_true“
                    help=“Whether to freeze batch norm params.“)
parser.add_argument(“--ignore-label“ type=int default=IGNORE_LABEL
                    help=“The index of the label to ignore during the training.“)
parser.add_argument(“--imagenet“ type=str default=IMAGENET
                    help=“Path to ImageNet pretrained weights.“)
parser.add_argument(“--input-size“ type=int default=INPUT_SIZE
                    help=“height and width of images.“)
parser.add_argument(“--learning-rate“ type=float default=LEARNING_RATE
                    help=“base learning rate for training with polynomial decay.“)
parser.add_argument(“--momentum“ type=float default=MOMENTUM
                    help=“Momentum component of the optimiser.“)
parser.add_argument(“--not-restore-last“ action=“store_true“
                    help=“Whether to not restore last (FC) layers.“)
parser.add_argument(“--num-classes“ type=int default=NUM_CLASSES
                    help=“Number of classes to predict (including background).“)
parser.add_argument(“--num-gpus“ type=int default=NUM_GPUS
                    help=“Number of GPUs to use.“)
parser.add_argument(“--num-layers“ type=int default=NUM_layerS
                    help=“Number of layes in ResNet).“)
parser.add_argument(“--num-steps“ type=int default=NUM_STEPS
                    help=“Number of training steps.“)
parser.add_argument(“--power“ type=float default=POWER
                    help=“Decay parameter to compute the learning rate.“)
parser.add_argument(“--random-mirror“ action=“store_true

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\
     文件        1196  2018-02-12 03:06  DeepLabV3-Tensorflow-master\.gitignore
     文件        2914  2018-02-12 03:06  DeepLabV3-Tensorflow-master\README.md
     文件           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\__init__.py
     文件        4191  2018-02-12 03:06  DeepLabV3-Tensorflow-master\config.py
     文件        3190  2018-02-12 03:06  DeepLabV3-Tensorflow-master\convert_voc12.py
     文件        4351  2018-02-12 03:06  DeepLabV3-Tensorflow-master\eval_voc12.py
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\
     文件           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\__init__.py
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\
     文件         401  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\__init__.py
     文件        7123  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\image_reader.py
     文件      698411  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\train.txt
     文件        3319  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\utils.py
     文件       95633  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\VOC12\val.txt
     文件           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\__init__.py
     文件        3099  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\datasets\dataset_factory.py
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\nets\
     文件          41  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\nets\__init__.py
     文件       10320  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\nets\deeplabv3.py
     文件       10507  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\nets\resnet_utils.py
     文件       15397  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\nets\resnet_v1.py
     目录           0  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\preprocess\
     文件        2058  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\preprocess\utils.py
     文件        1351  2018-02-12 03:06  DeepLabV3-Tensorflow-master\libs\preprocess\voc.py
     文件         132  2018-02-12 03:06  DeepLabV3-Tensorflow-master\requirements.txt
     文件         622  2018-02-12 03:06  DeepLabV3-Tensorflow-master\setup.sh
     文件       10199  2018-02-12 03:06  DeepLabV3-Tensorflow-master\train_voc12.py

评论

共有 条评论