File size: 1,532 Bytes
c0b5137
 
10e2f7e
c3c3886
 
 
 
c0b5137
 
 
c3c3886
 
b28dc4a
 
c24a3b9
c9ad936
c3c3886
 
 
 
 
135e030
835482b
c0b5137
 
835482b
c0b5137
 
835482b
 
 
 
 
 
 
 
 
 
b28dc4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
54
---
license: apache-2.0
library_name: transformers
datasets:
- RationAI/PanNuke
tags:
- biology
---


# LSP-DETR: Efficient and Scalable Nuclei Segmentation in Whole Slide Images

Matěj Pekár, Vít Musil, Rudolf Nenutil, Petr Holub, Tomáš Brázdil

[[GitHub](https://github.com/RationAI/lsp-detr)]

LSP-DETR (Local Star Polygon DEtection TRansformer) is a lightweight, efficient, and end-to-end deep learning model for nuclei instance segmentation in histopathological images. It combines a DETR-based transformer decoder with star-convex polygon shape descriptors to enable accurate and fast segmentation without complex post-processing.




```python
from transformers import AutoModelForObjectDetection, AutoImageProcessor


processor = AutoImageProcessor.from_pretrained(
    "RationAI/LSP-DETR", trust_remote_code=True
)
model = AutoModelForObjectDetection.from_pretrained(
    "RationAI/LSP-DETR", trust_remote_code=True
)

inputs = processor(img, device=device, return_tensors="pt")
outputs = model(**inputs)
results = processor.post_process(outputs)
results = processor.post_process_instance(
  results, height=img.size[1], width=img.size[0]
)
```

## Citing LSP-DETR

```BibTeX
@misc{pekar2026lspdetr,
  title={LSP-DETR: Efficient and Scalable Nuclei Segmentation in Whole Slide Images}, 
  author={Matěj Pekár and Vít Musil and Rudolf Nenutil and Petr Holub and Tomáš Brázdil},
  year={2026},
  eprint={2601.03163},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2601.03163}
}
```