File size: 1,548 Bytes
47780ca
 
 
 
 
 
 
 
 
 
 
 
 
6d737eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
title: Opdmulti Demo
emoji: 🌍
colorFrom: gray
colorTo: red
sdk: gradio
sdk_version: 3.44.3
app_file: app.py
pinned: false
license: mit
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

# Installation

To setup the environment, run the following (recommended in a virtual environment):
```
# install base requirements
pip install -r pre-requirements.txt
pip install -r requirements.txt

cd mask2former/modeling/pixel_decoder/ops
python setup.py build install

# Option A: running locally only
pip install open3d==0.17.0

# Option B: running over ssh connection / headless environment
# in a separate folder
git clone https://github.com/isl-org/Open3D.git
cd Open3D/
mkdir build && cd build
cmake -DENABLE_HEADLESS_RENDERING=ON -DBUILD_GUI=OFF -DBUILD_WEBRTC=OFF -DUSE_SYSTEM_GLEW=OFF -DUSE_SYSTEM_GLFW=OFF ..
make -j$(nproc)
make install-pip-package
# to test custom build
cd ../examples/python/visualization/
python headless_rendering.py
```

The setup with pre-requirements.txt and requirements.txt resolves the issue that certain packages need to be installed
prior to others. By default, most additional packages should be added to requirements.txt.

## Usage
To startup the application locally, run
```
gradio app.py
```

You can view the app on the specified port (usually 7860). To run over an ssh connection, setup port forwarding using
`-L 7860:localhost:7860` when you create your ssh connection. Note that you will need to install Open3D in headless 
rendering for this to work.