spseg-tool


Namespseg-tool JSON
Version 2023.5a0 PyPI version JSON
download
home_page
SummarySP-SEG: Proof of concept tool for manual segmentation by spheripixel projection
upload_time2023-05-16 09:23:06
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License
keywords point cloud segmentation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SP-SEG: Proof of concept tool for manual segmentation by spheripixel projection
In this repository, you can find a proof of concept of the tool for manual point cloud labeling by spherical point-pixel projection.

## ❗ Limitations
The current version is just the proof of concept version.

## 🔧 Environment and installation
```python
python >= 3.10
```
Required packages:
```python
"PyQt5",
"Pillow",
"numpy",
"pydantic",
"scikit-learn",
"scipy",
"colormath",
"tqdm",
"toml"
```

To install the software:
1. Clone the repository and run inside:
```bash
pip install .
```
1. Or use:
```bash
pip install sp-seg
```

> If you're experiencing issues with installing the package, install firstly the dependencies:
> ```bash
> pip install PyQt5 Pillow numpy pydantic scikit-learn scipy colormath tqdm toml
> ```

Then, you can run the software with the command:
```bash
D:\>spseg
```


## 📖 Instruction
The main view of the software looks like the following:

1. [Starting the application](#starting-the-application)
1. [Opening point cloud](#opening-a-point-cloud)
1. [Loading labels definition](#loading-labels-definition)
1. [Zooming in and out](#zooming-in-and-out)
1. [Depth preview](#depth-preview)
1. [Depth scale](#depth-scale)
1. [Vertical roll](#vertical-roll)
1. [Horizontal roll](#horizontal-roll)
1. [Object segentation](#object-segmentation)
1. [Deselecting region](#deselecting-region)
1. [Changing mask opacity](#changing-mask-opacity)
1. [Accepting an object](#accepting-an-object)
1. [Saving segmentation result](#saving-segmentation-result)


### Starting the application
Having installed the application, just run the following command in the command line:
```bash
D:\>spseg
```
### Opening a point cloud
To open a point cloud, click `Open` icon in the toolbar and choose a proper file.
> ❗ At the moment only PTS files are supported 

> ❗ If you need to change the columns meaning of PTS opener, modify the `opener.column` key of the config file. Currently interpretable letters are `X`, `Y`, `Z`, `R`, `G`, and `B`

![](gifs/open_cloud.gif)


### Loading labels definition
To open labels click the proper icon in the toolbar and choose the JSON file with labels definitions.
Example labels definition may look like below:

```json
[
  {
    "label": "ceiling",
    "code": 0,
    "color": [4, 255, 0]
  },
  {
    "label": "floor",
    "code": 1,
    "color": [255, 128, 0]
  }
]
```

![](gifs/open_labels.gif)


### Zooming in and out
For easier detail selection you can zoom in and zoom out. To do so keep `Ctrl` pressed and use mouse wheel.
![](gifs/zoom.gif)


### Depth preview
Sometimes, it may be useful to get insight into depth distribution. To see the depth map, just press `Alt` button.
![](gifs/depth.gif)

### Depth scale
To change $\gamma$ of the depth map, use `+` or `-` buttons while `Alt` is pressed.
![](gifs/depth_scale.gif)


### Vertical roll
To roll the scene vertically, press `Q` button.
![](gifs/roll_vert.gif)


### Horizontal roll
To roll the scene horizontally, press `W` button.
![](gifs/roll_hor.gif)

### Object segmentation
To segment an object, choose the proper category in the menu of the left and start selecting the polygon.
To add a vertex to the polygon, use left mouse button. If you want to close a polygon, click right mouse button.

> ❗ Closing polygon creates an edge between the first and the last added vertex!

> ❗ You don't need to select the entire object using a single polygon. You can draw as many polygons for an object as you wish, until the object segmentation will be accepted by pressing `F1` button.

![](gifs/select.gif)

### Deselecting region
You can deselect fragments of scene selected by mistake. To do so, check the mode to `Deselect` (radio button in the tollbar) or use `Caps Lock` button.
For deselecting you also draws a polygon.

> ❗ Remember to change the mode to `Select` when you already deselected the desired points.

![](gifs/deselect.gif)

### Changing mask opacity

To change the opacity of the mask of currently segmented object, use the slider just below the toolbar.
![](gifs/transparency.gif)


### Accepting an object
When you finish the object segmentation you need to accept the instance of the category by clicking `F1` button.
![](gifs/save_obj.gif)


### Saving segmentation result
To save the PTS result, choose the proper icon in the toolbar menu.
![](gifs/save_cloud.gif)


## 🏎️ Further development
- [ ] code optimization
- [ ] code cleaning
- [ ] add handling other point cloud formats
- [ ] handle non-single-setup point clouds
- [ ] enable saving draft segmentation result


## 📝 Citation

```bibtex
@ONLINE{sp-seg,
  author = {Walczak, J., Osuch, A., Wojciechowski, A.},
  title = {{SP-SEG}: Proof of concept tool for manual segmentation by spheripixel projection},
  year = 2023,
  url = {https://github.com/jamesWalczak/sp-seg-tool},
  urldate = {<access date here>}
}
```

## ⚖️ 3rd party attribution
<b>Icons attribution:</b> <a href='https://www.flaticon.com/free-icons/save' title='save icons'>Save icons created by Freepik - Flaticon</a>
<br/>
<b>Animation attribution:</b> Animation generated from <a href='https://icons8.com'>Icons8</a>

## 🎁 Ackowledgement
This software was developed as a part of the research project "Semantic analysis of 3D point clouds", co-funded by the Polish National Center for Research and Development under the LIDER XI program [grant number 0092/L-11/2019]. 

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "spseg-tool",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "point cloud,segmentation",
    "author": "",
    "author_email": "\"Jakub Walczak, Adam Osuch, Adam Wojciechowski\" <jakub.walczak@p.lodz.pl>",
    "download_url": "https://files.pythonhosted.org/packages/37/d7/ae992c349fb47a913718466f0a70f6536c5017b1ec218bcacb24612939f4/spseg-tool-2023.5a0.tar.gz",
    "platform": null,
    "description": "# SP-SEG: Proof of concept tool for manual segmentation by spheripixel projection\nIn this repository, you can find a proof of concept of the tool for manual point cloud labeling by spherical point-pixel projection.\n\n## \u2757 Limitations\nThe current version is just the proof of concept version.\n\n## \ud83d\udd27 Environment and installation\n```python\npython >= 3.10\n```\nRequired packages:\n```python\n\"PyQt5\",\n\"Pillow\",\n\"numpy\",\n\"pydantic\",\n\"scikit-learn\",\n\"scipy\",\n\"colormath\",\n\"tqdm\",\n\"toml\"\n```\n\nTo install the software:\n1. Clone the repository and run inside:\n```bash\npip install .\n```\n1. Or use:\n```bash\npip install sp-seg\n```\n\n> If you're experiencing issues with installing the package, install firstly the dependencies:\n> ```bash\n> pip install PyQt5 Pillow numpy pydantic scikit-learn scipy colormath tqdm toml\n> ```\n\nThen, you can run the software with the command:\n```bash\nD:\\>spseg\n```\n\n\n## \ud83d\udcd6 Instruction\nThe main view of the software looks like the following:\n\n1. [Starting the application](#starting-the-application)\n1. [Opening point cloud](#opening-a-point-cloud)\n1. [Loading labels definition](#loading-labels-definition)\n1. [Zooming in and out](#zooming-in-and-out)\n1. [Depth preview](#depth-preview)\n1. [Depth scale](#depth-scale)\n1. [Vertical roll](#vertical-roll)\n1. [Horizontal roll](#horizontal-roll)\n1. [Object segentation](#object-segmentation)\n1. [Deselecting region](#deselecting-region)\n1. [Changing mask opacity](#changing-mask-opacity)\n1. [Accepting an object](#accepting-an-object)\n1. [Saving segmentation result](#saving-segmentation-result)\n\n\n### Starting the application\nHaving installed the application, just run the following command in the command line:\n```bash\nD:\\>spseg\n```\n### Opening a point cloud\nTo open a point cloud, click `Open` icon in the toolbar and choose a proper file.\n> \u2757 At the moment only PTS files are supported \n\n> \u2757 If you need to change the columns meaning of PTS opener, modify the `opener.column` key of the config file. Currently interpretable letters are `X`, `Y`, `Z`, `R`, `G`, and `B`\n\n![](gifs/open_cloud.gif)\n\n\n### Loading labels definition\nTo open labels click the proper icon in the toolbar and choose the JSON file with labels definitions.\nExample labels definition may look like below:\n\n```json\n[\n  {\n    \"label\": \"ceiling\",\n    \"code\": 0,\n    \"color\": [4, 255, 0]\n  },\n  {\n    \"label\": \"floor\",\n    \"code\": 1,\n    \"color\": [255, 128, 0]\n  }\n]\n```\n\n![](gifs/open_labels.gif)\n\n\n### Zooming in and out\nFor easier detail selection you can zoom in and zoom out. To do so keep `Ctrl` pressed and use mouse wheel.\n![](gifs/zoom.gif)\n\n\n### Depth preview\nSometimes, it may be useful to get insight into depth distribution. To see the depth map, just press `Alt` button.\n![](gifs/depth.gif)\n\n### Depth scale\nTo change $\\gamma$ of the depth map, use `+` or `-` buttons while `Alt` is pressed.\n![](gifs/depth_scale.gif)\n\n\n### Vertical roll\nTo roll the scene vertically, press `Q` button.\n![](gifs/roll_vert.gif)\n\n\n### Horizontal roll\nTo roll the scene horizontally, press `W` button.\n![](gifs/roll_hor.gif)\n\n### Object segmentation\nTo segment an object, choose the proper category in the menu of the left and start selecting the polygon.\nTo add a vertex to the polygon, use left mouse button. If you want to close a polygon, click right mouse button.\n\n> \u2757 Closing polygon creates an edge between the first and the last added vertex!\n\n> \u2757 You don't need to select the entire object using a single polygon. You can draw as many polygons for an object as you wish, until the object segmentation will be accepted by pressing `F1` button.\n\n![](gifs/select.gif)\n\n### Deselecting region\nYou can deselect fragments of scene selected by mistake. To do so, check the mode to `Deselect` (radio button in the tollbar) or use `Caps Lock` button.\nFor deselecting you also draws a polygon.\n\n> \u2757 Remember to change the mode to `Select` when you already deselected the desired points.\n\n![](gifs/deselect.gif)\n\n### Changing mask opacity\n\nTo change the opacity of the mask of currently segmented object, use the slider just below the toolbar.\n![](gifs/transparency.gif)\n\n\n### Accepting an object\nWhen you finish the object segmentation you need to accept the instance of the category by clicking `F1` button.\n![](gifs/save_obj.gif)\n\n\n### Saving segmentation result\nTo save the PTS result, choose the proper icon in the toolbar menu.\n![](gifs/save_cloud.gif)\n\n\n## \ud83c\udfce\ufe0f Further development\n- [ ] code optimization\n- [ ] code cleaning\n- [ ] add handling other point cloud formats\n- [ ] handle non-single-setup point clouds\n- [ ] enable saving draft segmentation result\n\n\n## \ud83d\udcdd Citation\n\n```bibtex\n@ONLINE{sp-seg,\n  author = {Walczak, J., Osuch, A., Wojciechowski, A.},\n  title = {{SP-SEG}: Proof of concept tool for manual segmentation by spheripixel projection},\n  year = 2023,\n  url = {https://github.com/jamesWalczak/sp-seg-tool},\n  urldate = {<access date here>}\n}\n```\n\n## \u2696\ufe0f 3rd party attribution\n<b>Icons attribution:</b> <a href='https://www.flaticon.com/free-icons/save' title='save icons'>Save icons created by Freepik - Flaticon</a>\n<br/>\n<b>Animation attribution:</b> Animation generated from <a href='https://icons8.com'>Icons8</a>\n\n## \ud83c\udf81 Ackowledgement\nThis software was developed as a part of the research project \"Semantic analysis of 3D point clouds\", co-funded by the Polish National Center for Research and Development under the LIDER XI program [grant number 0092/L-11/2019]. \n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "SP-SEG: Proof of concept tool for manual segmentation by spheripixel projection",
    "version": "2023.5a0",
    "project_urls": null,
    "split_keywords": [
        "point cloud",
        "segmentation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71dc20a709335ea2bb3bcf26193668a740685a4d7c8e6d7faea5ec61d24989a3",
                "md5": "4a6a45749466c2e9846aceacc821f1e7",
                "sha256": "bfaef8ca2bc0cbb3758ba8cdd9ba04c3c9ff97710f3e4982048de868fd910cba"
            },
            "downloads": -1,
            "filename": "spseg_tool-2023.5a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a6a45749466c2e9846aceacc821f1e7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 134592,
            "upload_time": "2023-05-16T09:23:03",
            "upload_time_iso_8601": "2023-05-16T09:23:03.764226Z",
            "url": "https://files.pythonhosted.org/packages/71/dc/20a709335ea2bb3bcf26193668a740685a4d7c8e6d7faea5ec61d24989a3/spseg_tool-2023.5a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37d7ae992c349fb47a913718466f0a70f6536c5017b1ec218bcacb24612939f4",
                "md5": "95ac54524cf195c1e4e64948fde1a2de",
                "sha256": "d6c88c6ff3fe39d6b8186813e1150247c41cb00301b7ea5c5a56291c74147ead"
            },
            "downloads": -1,
            "filename": "spseg-tool-2023.5a0.tar.gz",
            "has_sig": false,
            "md5_digest": "95ac54524cf195c1e4e64948fde1a2de",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 133637,
            "upload_time": "2023-05-16T09:23:06",
            "upload_time_iso_8601": "2023-05-16T09:23:06.482691Z",
            "url": "https://files.pythonhosted.org/packages/37/d7/ae992c349fb47a913718466f0a70f6536c5017b1ec218bcacb24612939f4/spseg-tool-2023.5a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-16 09:23:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "spseg-tool"
}
        
Elapsed time: 1.26831s