meetps/pytorch-semseg
meetps/pytorch-semseg has 3,404 GitHub stars and 784 forks. GitHot measured 0 stars in 24 hours and +1 in 7 days. Last checked 2026-11-06 17:18 UTC. Last push 2023-10-11.
PyTorch로 구현한 의미론적 분할 아키텍처
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- 업데이트 지연
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalpytorch-semseg
Semantic Segmentation Algorithms Implemented in PyTorch
This repository aims at mirroring popular semantic segmentation architectures in PyTorch.
Networks implemented
- PSPNet - With support for loading pretrained models w/o caffe dependency
- ICNet - With optional batchnorm and pretrained models
- FRRN - Model A and B
- FCN - All 1 (FCN32s), 2 (FCN16s) and 3 (FCN8s) stream variants
- U-Net - With optional deconvolution and batchnorm
- Link-Net - With multiple resnet backends
- Segnet - With Unpooling using Maxpool indices
Upcoming
DataLoaders implemented
Requirements
- pytorch >=0.4.0
- torchvision ==0.2.0
- scipy
- tqdm
- tensorboardX
One-line installation
pip install -r requirements.txt
Data
- Download data for desired dataset(s) from list of URLs here.
- Extract the zip / tar and modify the path appropriately in your
config.yaml
Usage
Setup config file
# Model Configuration
model:
arch: <name> [options: 'fcn[8,16,32]s, unet, segnet, pspnet, icnet, icnetBN, linknet, frrn[A,B]'
<model_keyarg_1>:<value>
# Data Configuration
data:
dataset: <name> [options: 'pascal, camvid, ade20k, mit_sceneparsing_benchmark, cityscapes, nyuv2, sunrgbd, vistas']
train_split: <split_to_train_on>
val_split: <spit_to_validate_on>
img_rows: 512
img_cols: 1024
path: <path/to/data>
<dataset_keyarg1>:<value>
# Training Configuration
training:
n_workers: 64
train_iters: 35000
batch_size: 16
val_interval: 500
print_interval: 25
loss:
name: <loss_type> [options: 'cross_entropy, bootstrapped_cross_entropy, multi_scale_crossentropy']
<loss_keyarg1>:<value>
# Optmizer Configuration
optimizer:
name: <optimizer_name> [options: 'sgd, adam, adamax, asgd, adadelta, adagrad, rmsprop']
lr: 1.0e-3
<optimizer_keyarg1>:<value>
# Warmup LR Configuration
warmup_iters: <iters for lr warmup>
mode: <'constant' or 'linear' for warmup'>
gamma: <gamma for warm up>
# Augmentations Configuration
augmentations:
gamma: x #[gamma varied in 1 to 1+x]
hue: x #[hue varied in -x to x]
brightness: x #[brightness varied in 1-x to 1+x]
saturation: x #[saturation varied in 1-x to 1+x]
contrast: x #[contrast varied in 1-x to 1+x]
rcrop: [h, w] #[crop of size (h,w)]
translate: [dh, dw] #[reflective translation by (dh, dw)]
rotate: d #[rotate -d to d degrees]
scale: [h,w] #[scale to size (h,w)]
ccrop: [h,w] #[center crop of (h,w)]
hflip: p #[flip horizontally with chance p]
vflip: p #[flip vertically with chance p]
# LR Schedule Configuration
lr_schedule:
name: <schedule_type> [options: 'constant_lr, poly_lr, multi_step, cosine_annealing, exp_lr']
<scheduler_keyarg1>:<value>
# Resume from checkpoint
resume: <path_to_checkpoint>
To train the model :
python train.py [-h] [--config [CONFIG]]
--config Configuration file to use
To validate the model :
usage: validate.py [-h] [--config [CONFIG]] [--model_path [MODEL_PATH]]
[--eval_flip] [--measure_time]
--config Config file to be used
--model_path Path to the saved model
--eval_flip Enable evaluation with flipped image | True by default
--measure_time Enable evaluation with time (fps) measurement | True
by default
To test the model w.r.t. a dataset on custom images(s):
python test.py [-h] [--model_path [MODEL_PATH]] [--dataset [DATASET]]
[--dcrf [DCRF]] [--img_path [IMG_PATH]] [--out_path [OUT_PATH]]
--model_path Path to the saved model
--dataset Dataset to use ['pascal, camvid, ade20k etc']
--dcrf Enable DenseCRF based post-processing
--img_path Path of the input image
--out_path Path of the output segmap
If you find this code useful in your research, please consider citing:
@article{mshahsemseg,
Author = {Meet P Shah},
Title = {Semantic Segmentation Architectures Implemented in PyTorch.},
Journal = {https://github.com/meetshah1995/pytorch-semseg},
Year = {2017}
}
관련 프로젝트 살펴보기
tensorflow/tensorflow
모두를 위한 오픈소스 머신러닝 프레임워크
201,367 스타huggingface/transformers
🤗 Transformers: 텍스트, 비전, 오디오, 멀티모달 분야의 최첨단 머신러닝 모델을 위한 모델 정의 프레임워크로, 추론과 학습을 모두 지원합니다.
168,609 스타AUTOMATIC1111/stable-diffusion-webui
Stable Diffusion 웹 UI
165,245 스타Comfy-Org/ComfyUI
그래프와 노드로 구성된 인터페이스를 갖춘, 가장 강력하고 모듈성이 뛰어난 확산 모델 GUI, API, 백엔드입니다. 세계에서 가장 빠른 로컬 추론 엔진입니다.
145,470 스타