Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oliver-batchelor/segmentation
Image segmentation using pytorch.
https://github.com/oliver-batchelor/segmentation
convolutional-neural-networks machinine-learning pytorch segmentation
Last synced: about 1 month ago
JSON representation
Image segmentation using pytorch.
- Host: GitHub
- URL: https://github.com/oliver-batchelor/segmentation
- Owner: oliver-batchelor
- Created: 2017-04-12T06:05:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T03:41:16.000Z (over 6 years ago)
- Last Synced: 2023-03-24T04:57:57.188Z (almost 2 years ago)
- Topics: convolutional-neural-networks, machinine-learning, pytorch, segmentation
- Language: Python
- Homepage:
- Size: 762 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Segmentation dataset
Make sure to checkout with --recurse-submodules, there's a submodule 'tools' for common bits and pieces)
It loads a folder full of images and masks (pixel value corresponds to class) with a config file.An example dataset to train on can be found at:
https://drive.google.com/file/d/0B_mOCEqr7usZa2hra0xZUTJscE0/viewOr classes/images from the COCO/Pascal VOC dataset can be imported from scripts in the import/ folder.
# View the training or testing set and mask annotations:
`python -m dataset.view --input /path/to/dataset --train (or --test)`Useful to check the preprocessing of images.
# View a mask file
`python view_labels.py some/file.jpg.mask`# Train a model:
`python main.py --lr 0.1 --batch_size 4 --input /path/to/dataset --model "unet --depth 5" --epoch_size 1024`## Common options:
`--load`, load from a previous checkpoint and cointunue training
`--model`, specify model and model parameters (use quotes)
`--show`, show results of evaluating the model in training (sanity check)# Evaluate a model on new image(s):
`python test.py --batch /path/to/images --model log/model.pth --save results_path` (and/or `--show`)
`python test.py --image /my/image.jpg --model log/model.pth --show`