Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -9,45 +9,63 @@ tags:
|
|
| 9 |
library_name: gapseg
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
learned network
|
| 18 |
|
| 19 |
<p align="center">
|
| 20 |
-
<img src="gallery.gif" width="
|
| 21 |
</p>
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|---------------|--------:|----------:|
|
| 27 |
-
| single view | 6.40 | β |
|
| 28 |
-
| geometric fusion | 5.44 | 88% (sig) |
|
| 29 |
-
| **single + completion** | **2.99** | 92% (sig) |
|
| 30 |
-
| **diagnosis-gated completion** | **3.12** | 91% (sig) |
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
```python
|
| 38 |
from gapseg.pipeline import GapSegPipeline
|
| 39 |
pipe = GapSegPipeline.from_pretrained("haeing/gapseg", device="cuda")
|
| 40 |
|
| 41 |
-
# rgb: HxWx3 uint8
|
| 42 |
# instances: [{"inst_id": 1, "mask": HxW bool, "R": 3x3, "t": (3,)}, ...]
|
| 43 |
out = pipe.infer(rgb, depth_m, K, instances)
|
| 44 |
for o in out:
|
| 45 |
print(o["inst_id"], o["dims_cm"], "completed:", o["completed"])
|
| 46 |
```
|
| 47 |
|
| 48 |
-
`R`/`t` (object pose) drive completion; objects
|
| 49 |
diagnosis threshold return their single-view cloud.
|
| 50 |
|
| 51 |
-
## Contents
|
| 52 |
-
- `sq2_gview/best.pt` β the G_view diagnoser (RGB-D β distortion / conditions)
|
| 53 |
-
- `sq3_completion/best.pt` β the PCN shape-completion network
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
library_name: gapseg
|
| 10 |
---
|
| 11 |
|
| 12 |
+
<p align="center">
|
| 13 |
+
<img src="mascot.png" width="240" alt="GapSeg mascot"/>
|
| 14 |
+
</p>
|
| 15 |
+
|
| 16 |
+
<h1 align="center">π¦ GapSeg</h1>
|
| 17 |
+
<p align="center"><b>Diagnosis-Gated Learned Shape Completion</b></p>
|
| 18 |
+
<p align="center"><i>One RGB-D photo in β a complete 3D shape out β¨</i></p>
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
|
| 22 |
+
A single photo of an object gives a **broken, half-there 3D shape** π« β hidden
|
| 23 |
+
sides are just missing. GapSeg is a little chameleon π¦π that **looks at each
|
| 24 |
+
object, guesses which ones came out distorted, and re-grows only those** with a
|
| 25 |
+
learned network. The result beats stitching many camera angles together.
|
| 26 |
|
| 27 |
<p align="center">
|
| 28 |
+
<img src="gallery.gif" width="620" alt="single RGB-D to completed 3D across 6 scenes"/>
|
| 29 |
</p>
|
| 30 |
+
<p align="center"><sub>one RGB-D frame β completed 3D, across 6 GraspNet scenes π</sub></p>
|
| 31 |
+
|
| 32 |
+
## β¨ Why it's neat
|
| 33 |
|
| 34 |
+
- π **Diagnose first** β predict per-object distortion from a single frame
|
| 35 |
+
- π§© **Complete only what's broken** β learned shape completion, gated by the diagnosis
|
| 36 |
+
- π **Beats geometric multi-view fusion** β with just one view + completion
|
| 37 |
|
| 38 |
+
## π Results (GraspNet, 278 objects, chamfer mm β lower = better)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
| method | chamfer | vs single |
|
| 41 |
+
|---|--:|--:|
|
| 42 |
+
| π· single view | 6.60 | β |
|
| 43 |
+
| π§΅ geometric fusion | 5.64 | 88% β
|
|
| 44 |
+
| π§© **single + completion** | **2.75** | 95% β
|
|
| 45 |
+
| π¦ **diagnosis-gated completion** | **2.84** | 94% β
|
|
| 46 |
|
| 47 |
+
> π― **One photo + learned completion (2.75 mm) beats fusing many views (5.64 mm).**
|
| 48 |
+
> Gating it by the diagnoser keeps the gain while only completing the hard objects.
|
| 49 |
+
|
| 50 |
+
## π Usage
|
| 51 |
|
| 52 |
```python
|
| 53 |
from gapseg.pipeline import GapSegPipeline
|
| 54 |
pipe = GapSegPipeline.from_pretrained("haeing/gapseg", device="cuda")
|
| 55 |
|
| 56 |
+
# rgb: HxWx3 uint8 Β· depth_m: HxW float (metres) Β· K: 3x3
|
| 57 |
# instances: [{"inst_id": 1, "mask": HxW bool, "R": 3x3, "t": (3,)}, ...]
|
| 58 |
out = pipe.infer(rgb, depth_m, K, instances)
|
| 59 |
for o in out:
|
| 60 |
print(o["inst_id"], o["dims_cm"], "completed:", o["completed"])
|
| 61 |
```
|
| 62 |
|
| 63 |
+
π§ `R`/`t` (object pose) drive completion; objects with no pose or below the
|
| 64 |
diagnosis threshold return their single-view cloud.
|
| 65 |
|
| 66 |
+
## π¦ Contents
|
| 67 |
+
- π§ `sq2_gview/best.pt` β the G_view diagnoser (RGB-D β distortion / conditions)
|
| 68 |
+
- π§© `sq3_completion/best.pt` β the PCN shape-completion network
|
| 69 |
+
- πΌοΈ `gallery.gif` β rotating demo across 6 scenes
|
| 70 |
+
|
| 71 |
+
<p align="center"><sub>made with π¦ + π Β· single view, whole shape</sub></p>
|