Skip to content

Commit 697c2d7

Browse files
committed
Deleted old repository, this is the latest, new one
0 parents  commit 697c2d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+16142
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
*.vcs
3+
*.xml
4+
.idea/

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
language: python

CHANGES.txt

Whitespace-only changes.

LICENSE.md

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

MANIFEST.in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#documentation
2+
recursive-include docs/_build/html *
3+
4+
#image data used for segmentation
5+
recursive-include segraph/data *
6+
7+
#phonetic representation
8+
include segraph/Makefile
9+
10+
#example files
11+
include segraph/example/EXAMPLE.*
12+
13+
#Misc
14+
include CHANGES.txt
15+
include LICENSE.txt
16+
include README.md

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
2+
[![DOI](https://zenodo.org/badge/92789575.svg)](https://zenodo.org/badge/latestdoi/92789575)
3+
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
4+
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.png?v=103)](https://github.com/alivcor/segraph)
5+
[![dependencies Status](https://david-dm.org/boennemann/badges/status.svg)](https://github.com/alivcor/segraph)
6+
[![Build Status](https://travis-ci.org/alivcor/segraph.svg?branch=master)](https://travis-ci.org/alivcor/segraph)
7+
8+
<p align="center">
9+
<img src="logo.png"/>
10+
</p>
11+
12+
13+
The segraph library provides modules for creating graphs from SLIC segments. This can be used with PyStruct library for image segmentation using CRF.
14+
15+
<a href="https://github.com/alivcor/segraph">:octocat: Link to GitHub Repo</a>
16+
17+
## Getting Started
18+
19+
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See examples to see a quick example.
20+
21+
### Prerequisites
22+
23+
You will need to have NumPY installed on your system. The segraph library was built with Python 2.7, keeping in mind the stability with Python 3+, but it is not guranteed.
24+
25+
```
26+
pip install numpy
27+
```
28+
29+
### Installation
30+
31+
There are multiple ways to install segraph on your system:
32+
33+
#### Python Package Index
34+
35+
segraph is now available at https://pypi.python.org/pypi/segraph/0.5
36+
37+
38+
39+
```
40+
1. Download the tar/zip from https://pypi.python.org/pypi/segraph/0.5
41+
2. Move the package to your desired location / python version, and unzip the archive.
42+
Optionally, if you have a linux-based machine (Ubuntu/OSX):
43+
tar xvzf segraph-0.x.tar.gz -C /path/to/desireddirectory
44+
3. Migrate to the segraph folder, and run
45+
python setup.py install
46+
```
47+
48+
#### Using pip
49+
50+
```
51+
pip install segraph
52+
```
53+
54+
To upgrade,
55+
56+
```
57+
pip install --upgrade segraph
58+
```
59+
60+
61+
## Using segraph
62+
63+
segraph can be very helpful for creating graphs from SLIC segmented images (superpixels). Here is an example usage:
64+
65+
```
66+
from skimage.segmentation import slic
67+
from skimage.util import img_as_float
68+
from skimage import io as skimageIO
69+
from segraph import create_graph
70+
import numpy as np
71+
72+
image = img_as_float(skimageIO.imread("segraph/data/flowers.png"))
73+
segments = slic(image, n_segments=500, sigma=1.0)
74+
# Create graph of superpixels
75+
vertices, edges = create_graph(segments)
76+
77+
# Compute centers:
78+
gridx, gridy = np.mgrid[:segments.shape[0], :segments.shape[1]]
79+
centers = dict()
80+
for v in vertices:
81+
centers[v] = [gridy[segments == v].mean(), gridx[segments == v].mean()]
82+
83+
```
84+
85+
segraph can be used with PyStruct library for image segmentation using CRF.
86+
87+
88+
## Contributing
89+
90+
You are welcome to send a pull-request.
91+
92+
## Contributors
93+
94+
Thanks to all the contributors for making it even more awesome !
95+
96+
- @pinkfloyd06
97+
98+
## Authors
99+
100+
* **Abhinandan Dubey** - *@alivcor* - [Human Interaction Lab, Stony Brook University](https://www.cs.stonybrook.edu/~adubey)
101+
102+
103+
## License
104+
105+
This project is licensed under the GNU General Public License v3 - see the [LICENSE.md](LICENSE.md) file for details
106+
107+
[![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](https://github.com/alivcor/segraph/#)
108+

archive/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Download the archive.

archive/segraph-0.5.tar.gz

979 KB
Binary file not shown.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = python -msphinx
7+
SPHINXPROJ = segraph
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
6.34 KB
Binary file not shown.

0 commit comments

Comments
 (0)