SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.09855 · ICLR · 2025

Text4Seg: Reimagining Image Segmentation as Text Generation

Xinjiang Wang, Yue Zhou, Wayne Zhang, Chaofeng Chen, Mengcheng Lan, Yiping Ke, Jiaxing Xu, Litong Feng

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2410.09855.json · badge: /api/ran/2410.09855.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mc-lan/Text4Seg canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
mc-lan/text4seg canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_fn Ran
ran; our contract draft was wrong, not the code
mc-lan/Text4Seg/ms-swift/text4seg/infer_refer_seg.py
pointer only (licence: NOASSERTION) · get_code("de467f8ba53ec4a4")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/Text4Seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

decode_mask Ran
ran; our contract draft was wrong, not the code
mc-lan/text4seg/llava/eval/utils.py
pointer only (licence: NOASSERTION) · get_code("e5321304736f43a1")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/text4seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

decode_mask_s Ran
ran; our contract draft was wrong, not the code
mc-lan/Text4Seg/ms-swift/text4seg/utils.py
pointer only (licence: NOASSERTION) · get_code("6a0145687dd13bee")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/Text4Seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_chunk Ran
ran; our contract draft was wrong, not the code
mc-lan/Text4Seg/ms-swift/text4seg/infer_refer_seg.py
pointer only (licence: NOASSERTION) · get_code("fec9d7679b542a15")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/Text4Seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_rel_pos Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/modeling/image_encoder.py
pointer only (licence: NONE) · get_code("733d7f0bedcb74c2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

translate_sequence Ran
ran, honoured the contract we drafted
mc-lan/Text4Seg/ms-swift/text4seg/utils.py
pointer only (licence: NOASSERTION) · get_code("18d30ac60d5a69d2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/Text4Seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

window_partition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/modeling/image_encoder.py
pointer only (licence: NONE); the stored copy get_code serves, from LeapLabTHU/EchoWorld, is pointer only (licence: NONE) · get_code("105fa08885dc36cc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

window_unpartition Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/modeling/image_encoder.py
pointer only (licence: NONE); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("27be441cc8213e52")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_sam_vit_b Not yet run
unverified (harvested, no recorded run)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/build_sam.py
pointer only (licence: NONE); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("f9bc5f31ce61cee8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

build_sam_vit_h Not yet run
unverified (harvested, no recorded run)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/build_sam.py
pointer only (licence: NONE); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("6b77c1f11fff3ed6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

build_sam_vit_l Not yet run
unverified (harvested, no recorded run)
mc-lan/Text4Seg/ms-swift/text4seg/segment_anything/build_sam.py
pointer only (licence: NONE); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("3f8890e695469246")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mc-lan/Text4Seg when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

gget_chunk Not yet run
unverified (harvested, no recorded run)
mc-lan/Text4Seg/ms-swift/text4seg/infer_refer_seg.py
pointer only (licence: NOASSERTION) · get_code("2a5e65f48eefb34b")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, mc-lan/Text4Seg (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 6 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_rel_pos 47 other papers
38 dated earlier, 7 later, 2 same year, order not determinable · 5 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_partition 47 other papers
39 dated earlier, 6 later, 2 same year, order not determinable · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 44 more not named here
window_unpartition 46 other papers
38 dated earlier, 6 later, 2 same year, order not determinable · 1 only as an assembly brick
2304.02643 (2023-04)
Segment Anything
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
and 43 more not named here
build_sam_vit_h 37 other papers
30 dated earlier, 5 later, 2 same year, order not determinable · 2 only as an assembly brick
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 34 more not named here
build_sam_vit_b 34 other papers
29 dated earlier, 3 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
build_sam_vit_l 34 other papers
29 dated earlier, 3 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Multimodal Large Language Models (MLLMs) have shown exceptional capabilities in vision-language tasks; however, effectively integrating image segmentation into these models remains a significant challenge. In this paper, we introduce Text4Seg, a novel text-as-mask paradigm that casts image segmentation as a text generation problem, eliminating the need for additional decoders and significantly simplifying the segmentation process. Our key innovation is semantic descriptors, a new textual representation of segmentation masks where each image patch is mapped to its corresponding text label. This unified representation allows seamless integration into the auto-regressive training pipeline of MLLMs for easier optimization. We demonstrate that representing an image with 16 × 16 semantic descriptors yields competitive segmentation performance. To enhance efficiency, we introduce the Row-wise Run-Length Encoding (R-RLE), which compresses redundant text sequences, reducing the length of semantic descriptors by 74% and accelerating inference by 3×, without compromising performance. Extensive experiments across various vision tasks, such as referring expression segmentation and comprehension, show that Text4Seg achieves state-of-the-art performance on multiple datasets by fine-tuning different MLLM backbones. Our approach provides an efficient, scalable solution for vision-centric tasks within the MLLM framework. https://github.com/mc-lan/Text4Seg

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.09855")
get_code_for_paper("2410.09855")
have("2410.09855")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2410.09855.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2410.09855.svg)](https://syntology.ai/paper/2410.09855)

Connect an agent — have() is free.