Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xieenze/Trans2Seg
https://github.com/xieenze/Trans2Seg
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/xieenze/Trans2Seg
- Owner: xieenze
- License: apache-2.0
- Created: 2021-01-21T06:46:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-15T20:01:31.000Z (over 2 years ago)
- Last Synced: 2024-08-03T10:19:52.678Z (6 months ago)
- Language: Python
- Size: 2.42 MB
- Stars: 144
- Watchers: 6
- Forks: 31
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome_transformer - Trans2Seg
- awesome_vision_transformer - code
- awesome_vision_transformer - code
README
# Transparent Transformer Segmentation
## Introduction
This repository contains the data and code for IJCAI 2021 paper [Segmenting transparent object in the wild with transformer](https://arxiv.org/abs/2101.08461).## Environments
- python 3
- torch = 1.4.0
- torchvision
- pyyaml
- Pillow
- numpy## INSTALL
```
python setup.py develop --user
```## Data Preparation
1. create dirs './datasets/transparent/Trans10K_v2'
2. put the train/validation/test data under './datasets/transparent/Trans10K_v2'.
Data Structure is shown below.
```
Trans10K_v2
├── test
│ ├── images
│ └── masks_12
├── train
│ ├── images
│ └── masks_12
└── validation
├── images
└── masks_12
```
Download Dataset: [Google Drive](https://drive.google.com/file/d/1YzAAMY8xfL9BMTIDU-nFC3dcGbSIBPu5/view?usp=sharing).
[Baidu Drive](https://pan.baidu.com/s/1P-2l-Q2brbnwRd2kXi--Dg). code: oqms## Network Define
The code of Network pipeline is in `segmentron/models/trans2seg.py`.The code of Transformer Encoder-Decoder is in `segmentron/modules/transformer.py`.
## Train
Our experiments are based on one machine with 8 V100 GPUs with 32g memory, about 1 hour training time.```
bash tools/dist_train.sh $CONFIG-FILE $GPUS
```For example:
```
bash tools/dist_train.sh configs/trans10kv2/trans2seg/trans2seg_medium.yaml 8
```## Test
```
bash tools/dist_train.sh $CONFIG-FILE $GPUS --test TEST.TEST_MODEL_PATH $MODEL_PATH
```## Citations
Please consider citing our paper in your publications if the project helps your research. BibTeX reference is as follows.```
@article{xie2021segmenting,
title={Segmenting transparent object in the wild with transformer},
author={Xie, Enze and Wang, Wenjia and Wang, Wenhai and Sun, Peize and Xu, Hang and Liang, Ding and Luo, Ping},
journal={arXiv preprint arXiv:2101.08461},
year={2021}
}
```