youngsm commited on
Commit
3d30c00
·
verified ·
1 Parent(s): d930ee4

Call postprocess in the usage example: the detector returns raw query predictions

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -11,7 +11,8 @@ Instance segmentation with the Panda V2 detector (`panda-detector-v2m1`). The en
11
  import pimm
12
 
13
  model = pimm.from_pretrained("DeepLearnPhysics/panda-v2-instance.pilarnet-m", device="cuda")
14
- output = model(batch) # the predicted instances
 
15
  ```
16
 
17
  Prepare inputs with the evaluation transforms of `configs/panda/v2/pilarnet-m/instance-panda-v2m1-0a-lora.py` in [pimm](https://github.com/DeepLearnPhysics/particle-imaging-models). On GPUs without FlashAttention, pass `attention_backend="torch"` to `pimm.from_pretrained`.
 
11
  import pimm
12
 
13
  model = pimm.from_pretrained("DeepLearnPhysics/panda-v2-instance.pilarnet-m", device="cuda")
14
+ output = model(batch)
15
+ instances = model.postprocess(output) # per-point instance ids, classes and confidences
16
  ```
17
 
18
  Prepare inputs with the evaluation transforms of `configs/panda/v2/pilarnet-m/instance-panda-v2m1-0a-lora.py` in [pimm](https://github.com/DeepLearnPhysics/particle-imaging-models). On GPUs without FlashAttention, pass `attention_backend="torch"` to `pimm.from_pretrained`.