<p align="center"><a target="_blank" rel="noopener noreferrer"><img width="100" src="./static/icon.png"></a></p>
<h1 align="center">DVIS: 3D Visualizations made easy</h1>
<h2 align="center">Visualize your data with just one line of code </h2>
<h2 align="center">Python -> Browser </h2>
<p align="center">
<img src="./static/tracking_sample.gif" width="40%" />
<img src="./static/shapenet_sample.gif" width="42.5%" />
<img src="./static/mesh_sample.gif" width="40%" />
<img src="./static/camera_path.gif" width="42.5%" />
</p>
# 💻 Usage
```python
from dvis import dvis
dvis("mesh.obj") # load file
dvis(point_cloud, vs=0.03) # point cloud with specific voxel size
dvis(bboxes,'bbox', c=3, name='my_boxes') # show colored boxes
dvis(np.array([0,0,0,1,2,3]), 'vec') # vector from origin to (1,2,3)
dvis(transform, 'transform') # display transformation
dvis(img, 'img') # display an image using visdom
```
Check out more examples in `./examples`
```
python examples/meshes.py
python examples/point_clouds.py
python examples/...
```
# News
* 0.8.8.0: Bumped dependencies version, custom port support
```
dvis(port=<PORT>) # set port the client is sending on
dvis(vis_port=<PORT>) # set the port for visdom
```
* 0.8.7.0: CLI for server: To start the server, use run
```
dvis-server [--no_visdom]
```
* 0.8.6.0: Histogram support using plotly
```
dvis(array, "hist", mi=0.1,ma=0.8, nbins=10, name="Example histogram")
```
* 0.8.4.0: Label and range image support, auto-format for img
```
dvis(label_img [fmt='xyl']) # visualizses img of labels
dvis(depth_map [fmt='xyr', cm='jet']) # visualizes an image of continuous values using cv2 color map
dvis(heat_map [fmt='xyr', cm='hot'])
```
# 🚀 Getting started
## 1. Install the `dvis` package:
Via pypi:
```
pip install dvis
```
or from source:
```
git clone git@github.com:SirWyver/dvis.git
cd dvis
pip install .
```
## 2. Start the web server
```
# From the dvis repository folder:
dvis-server
```
or manually
```
cd server
python server.py
```
Verify you can open http://localhost:5001/ and see something like this:
<p align="center">
<img src="./static/dvis_ui.png" width=40%>
</p>
Optionally, also start [visdom](https://github.com/fossasia/visdom) to display images/videos/charts:
```
visdom -p 4999
```
The visdom server should be accessible at http://localhost:4999/.
Try out the client
```python
import numpy as np
from dvis import dvis
dvis(np.random.rand(1000,6), s=0.03) # sends randomly colored 1000x3 point cloud to the 3d server
dvis("static/icon.png","img") # sends an image to the 2d server
```
Verify you can see a colored point cloud
# 📖 Documentation
For an overview of available commands check out the [documentation](https://sirwyver.github.io/dvis_docu/)
## Shotcuts
| Shortcut | Description |
|----------|---------------------------|
| **Editor** | |
| w | Translate |
| e | Rotate |
| r | Scale |
| z | Undo |
| f | Focus |
| **DVIS** | |
| v | Show/hide selected object |
| 1-5 | Toggle layer 1-5 |
| 0 | Toggle all layers |
| Shift + 0-5 | Show layer 0-5 add. |
| g | Show/hide grid & axes helper |
| n | Next keyframe |
| b | Previous keyframe |
| . | Next frame |
| , | Previous frame |
| t | Switch camera |
| [ | Download screenshot |
Raw data
{
"_id": null,
"home_page": "https://github.com/SirWyver/dvis",
"name": "dvis",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Norman M\u00fcller",
"author_email": "norman.mueller@tum.de",
"download_url": "",
"platform": null,
"description": "<p align=\"center\"><a target=\"_blank\" rel=\"noopener noreferrer\"><img width=\"100\" src=\"./static/icon.png\"></a></p>\n<h1 align=\"center\">DVIS: 3D Visualizations made easy</h1>\n<h2 align=\"center\">Visualize your data with just one line of code </h2>\n<h2 align=\"center\">Python -> Browser </h2>\n\n\n<p align=\"center\">\n <img src=\"./static/tracking_sample.gif\" width=\"40%\" />\n <img src=\"./static/shapenet_sample.gif\" width=\"42.5%\" />\n <img src=\"./static/mesh_sample.gif\" width=\"40%\" />\n <img src=\"./static/camera_path.gif\" width=\"42.5%\" />\n</p>\n\n# \ud83d\udcbb Usage\n```python\nfrom dvis import dvis\n\ndvis(\"mesh.obj\") # load file\ndvis(point_cloud, vs=0.03) # point cloud with specific voxel size\ndvis(bboxes,'bbox', c=3, name='my_boxes') # show colored boxes \ndvis(np.array([0,0,0,1,2,3]), 'vec') # vector from origin to (1,2,3)\ndvis(transform, 'transform') # display transformation\ndvis(img, 'img') # display an image using visdom\n```\nCheck out more examples in `./examples`\n```\npython examples/meshes.py\npython examples/point_clouds.py\npython examples/...\n```\n\n\n# News\n* 0.8.8.0: Bumped dependencies version, custom port support\n ```\n dvis(port=<PORT>) # set port the client is sending on\n dvis(vis_port=<PORT>) # set the port for visdom\n ```\n\n* 0.8.7.0: CLI for server: To start the server, use run\n ```\n dvis-server [--no_visdom]\n ```\n* 0.8.6.0: Histogram support using plotly\n ```\n dvis(array, \"hist\", mi=0.1,ma=0.8, nbins=10, name=\"Example histogram\")\n ```\n\n* 0.8.4.0: Label and range image support, auto-format for img\n ```\n dvis(label_img [fmt='xyl']) # visualizses img of labels\n dvis(depth_map [fmt='xyr', cm='jet']) # visualizes an image of continuous values using cv2 color map\n dvis(heat_map [fmt='xyr', cm='hot']) \n ```\n\n# \ud83d\ude80 Getting started\n\n## 1. Install the `dvis` package:\nVia pypi:\n```\npip install dvis\n```\nor from source:\n```\ngit clone git@github.com:SirWyver/dvis.git\ncd dvis\npip install .\n```\n## 2. Start the web server\n```\n# From the dvis repository folder:\ndvis-server \n```\nor manually\n```\ncd server\npython server.py\n```\n\nVerify you can open http://localhost:5001/ and see something like this:\n\n<p align=\"center\">\n<img src=\"./static/dvis_ui.png\" width=40%>\n</p>\n\nOptionally, also start [visdom](https://github.com/fossasia/visdom) to display images/videos/charts:\n```\nvisdom -p 4999\n```\nThe visdom server should be accessible at http://localhost:4999/.\n\nTry out the client\n```python\nimport numpy as np\nfrom dvis import dvis\ndvis(np.random.rand(1000,6), s=0.03) # sends randomly colored 1000x3 point cloud to the 3d server\ndvis(\"static/icon.png\",\"img\") # sends an image to the 2d server\n\n```\nVerify you can see a colored point cloud\n\n# \ud83d\udcd6 Documentation\nFor an overview of available commands check out the [documentation](https://sirwyver.github.io/dvis_docu/)\n\n## Shotcuts\n| Shortcut | Description |\n|----------|---------------------------|\n| **Editor** | |\n| w | Translate |\n| e | Rotate |\n| r | Scale |\n| z | Undo |\n| f | Focus |\n| **DVIS** | |\n| v | Show/hide selected object |\n| 1-5 | Toggle layer 1-5 |\n| 0 | Toggle all layers |\n| Shift + 0-5 | Show layer 0-5 add. |\n| g | Show/hide grid & axes helper |\n| n | Next keyframe |\n| b | Previous keyframe |\n| . | Next frame |\n| , | Previous frame |\n| t | Switch camera |\n| [ | Download screenshot |\n\n\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "The best web-based visualizer",
"version": "0.9.0.5",
"project_urls": {
"Homepage": "https://github.com/SirWyver/dvis"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e43911184bdaf92ddd3156991f916889e84a8b4da603e968558c0876e8e9f41b",
"md5": "4dd0952a2a2ddfe3c8626a74c8ab6b69",
"sha256": "1abbad4e5d64b3453945352450568ae77de64f64d377336bcb2efee3442d569d"
},
"downloads": -1,
"filename": "dvis-0.9.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dd0952a2a2ddfe3c8626a74c8ab6b69",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 19063,
"upload_time": "2023-11-20T19:55:31",
"upload_time_iso_8601": "2023-11-20T19:55:31.400540Z",
"url": "https://files.pythonhosted.org/packages/e4/39/11184bdaf92ddd3156991f916889e84a8b4da603e968558c0876e8e9f41b/dvis-0.9.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-20 19:55:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SirWyver",
"github_project": "dvis",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "torch",
"specs": [
[
">=",
"1.5"
]
]
},
{
"name": "requests",
"specs": []
},
{
"name": "visdom",
"specs": []
},
{
"name": "trimesh",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "transforms3d",
"specs": []
},
{
"name": "flask",
"specs": [
[
">=",
"2.3.2"
]
]
},
{
"name": "flask_socketio",
"specs": [
[
">=",
"5.3.4"
]
]
},
{
"name": "numpy",
"specs": []
},
{
"name": "pillow",
"specs": []
},
{
"name": "trimesh",
"specs": []
},
{
"name": "simple-websocket",
"specs": [
[
">=",
"0.2.0"
]
]
},
{
"name": "python-socketio",
"specs": [
[
">=",
"4.6.1"
]
]
},
{
"name": "eventlet",
"specs": []
},
{
"name": "jinja2",
"specs": [
[
">=",
"3.0.2"
]
]
},
{
"name": "itsdangerous",
"specs": [
[
"==",
"2.0.1"
]
]
},
{
"name": "werkzeug",
"specs": [
[
"==",
"2.0.3"
]
]
},
{
"name": "opencv-python",
"specs": []
}
],
"lcname": "dvis"
}