Remove usage section
Browse files
README.md
CHANGED
|
@@ -47,36 +47,6 @@ language:
|
|
| 47 |
|
| 48 |
When camera intrinsics are not available (e.g., in-the-wild images), the model can predict intrinsics internally. When sparse or dense depth (e.g., from LiDAR) is provided, it is fused for improved 3D localization.
|
| 49 |
|
| 50 |
-
## Usage
|
| 51 |
-
|
| 52 |
-
```python
|
| 53 |
-
from wilddet3d import build_model, preprocess
|
| 54 |
-
import numpy as np
|
| 55 |
-
from PIL import Image
|
| 56 |
-
|
| 57 |
-
# Build model (auto-downloads checkpoint from this repo)
|
| 58 |
-
model = build_model(
|
| 59 |
-
checkpoint="allenai/WildDet3D",
|
| 60 |
-
score_threshold=0.3,
|
| 61 |
-
skip_pretrained=True,
|
| 62 |
-
)
|
| 63 |
-
|
| 64 |
-
# Load and preprocess image
|
| 65 |
-
image = np.array(Image.open("image.jpg")).astype(np.float32)
|
| 66 |
-
data = preprocess(image, intrinsics=None)
|
| 67 |
-
|
| 68 |
-
# Text prompt
|
| 69 |
-
results = model(
|
| 70 |
-
images=data["images"].cuda(),
|
| 71 |
-
intrinsics=data["intrinsics"].cuda()[None],
|
| 72 |
-
input_hw=[data["input_hw"]],
|
| 73 |
-
original_hw=[data["original_hw"]],
|
| 74 |
-
padding=[data["padding"]],
|
| 75 |
-
input_texts=["car", "person", "bicycle"],
|
| 76 |
-
)
|
| 77 |
-
boxes, boxes3d, scores, scores_2d, scores_3d, class_ids, depth_maps = results
|
| 78 |
-
```
|
| 79 |
-
|
| 80 |
## Citation
|
| 81 |
|
| 82 |
```bibtex
|
|
|
|
| 47 |
|
| 48 |
When camera intrinsics are not available (e.g., in-the-wild images), the model can predict intrinsics internally. When sparse or dense depth (e.g., from LiDAR) is provided, it is fused for improved 3D localization.
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
## Citation
|
| 51 |
|
| 52 |
```bibtex
|