Skip to main content

SP-SEG: Proof of concept tool for manual segmentation by spheripixel projection

Project description

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 >= 3.10

Required packages:

"PyQt5",
"Pillow",
"numpy",
"pydantic",
"scikit-learn",
"scipy",
"colormath",
"tqdm",
"toml"

To install the software:

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

If you're experiencing issues with installing the package, install firstly the dependencies:

pip install PyQt5 Pillow numpy pydantic scikit-learn scipy colormath tqdm toml

Then, you can run the software with the command:

D:\>spseg

📖 Instruction

The main view of the software looks like the following:

  1. Starting the application
  2. Opening point cloud
  3. Loading labels definition
  4. Zooming in and out
  5. Depth preview
  6. Depth scale
  7. Vertical roll
  8. Horizontal roll
  9. Object segentation
  10. Deselecting region
  11. Changing mask opacity
  12. Accepting an object
  13. Saving segmentation result

Starting the application

Having installed the application, just run the following command in the command line:

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

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:

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

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.

Depth preview

Sometimes, it may be useful to get insight into depth distribution. To see the depth map, just press Alt button.

Depth scale

To change $\gamma$ of the depth map, use + or - buttons while Alt is pressed.

Vertical roll

To roll the scene vertically, press Q button.

Horizontal roll

To roll the scene horizontally, press W button.

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.

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.

Changing mask opacity

To change the opacity of the mask of currently segmented object, use the slider just below the toolbar.

Accepting an object

When you finish the object segmentation you need to accept the instance of the category by clicking F1 button.

Saving segmentation result

To save the PTS result, choose the proper icon in the toolbar menu.

🏎️ Further development

  • code optimization
  • code cleaning
  • add handling other point cloud formats
  • handle non-single-setup point clouds
  • enable saving draft segmentation result

📝 Citation

@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

Icons attribution: Save icons created by Freepik - Flaticon
Animation attribution: Animation generated from Icons8

🎁 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].

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spseg-tool-2023.5a0.tar.gz (133.6 kB view details)

Uploaded Source

Built Distribution

spseg_tool-2023.5a0-py3-none-any.whl (134.6 kB view details)

Uploaded Python 3

File details

Details for the file spseg-tool-2023.5a0.tar.gz.

File metadata

  • Download URL: spseg-tool-2023.5a0.tar.gz
  • Upload date:
  • Size: 133.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for spseg-tool-2023.5a0.tar.gz
Algorithm Hash digest
SHA256 d6c88c6ff3fe39d6b8186813e1150247c41cb00301b7ea5c5a56291c74147ead
MD5 95ac54524cf195c1e4e64948fde1a2de
BLAKE2b-256 37d7ae992c349fb47a913718466f0a70f6536c5017b1ec218bcacb24612939f4

See more details on using hashes here.

File details

Details for the file spseg_tool-2023.5a0-py3-none-any.whl.

File metadata

File hashes

Hashes for spseg_tool-2023.5a0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfaef8ca2bc0cbb3758ba8cdd9ba04c3c9ff97710f3e4982048de868fd910cba
MD5 4a6a45749466c2e9846aceacc821f1e7
BLAKE2b-256 71dc20a709335ea2bb3bcf26193668a740685a4d7c8e6d7faea5ec61d24989a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page