SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.02109 · 2024

HRSAM: Efficient Interactive Segmentation in High-Resolution Images

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 4 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 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/2407.02109.json · badge: /api/ran/2407.02109.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
youhuang67/high-resolution-segment-anything canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
calculate_file_sha256 Ran
ran; our contract draft was wrong, not the code
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/gather_models.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("a669df2cd07c07bb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

compute_padding_size Ran
ran, honoured the contract we drafted
youhuang67/high-resolution-segment-anything/models/backbones/hrsam.py
pointer only (licence: NONE) · get_code("c487cc10368455e6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

dump_yaml_and_check_difference Ran
ran, violated the contract we drafted
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/update_model_index.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("b8bb3de40cf61c64")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

expand_and_concat Ran
ran, honoured the contract we drafted
youhuang67/high-resolution-segment-anything/models/backbones/hrsam.py
pointer only (licence: NONE) · get_code("223fe4cf438375b1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

get_collection_name_list Ran
ran; our contract draft was wrong, not the code
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/update_model_index.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("b9e0b82131912b70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

get_final_iter Ran
ran, honoured the contract we drafted
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/gather_models.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("88d68650d669bb11")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

get_layer_id_for_vit Ran
ran, honoured the contract we drafted
youhuang67/high-resolution-segment-anything/engine/optimizers/vit_layer_decay_optimizer_constructor.py
pointer only (licence: NONE) · get_code("edd0eeba72aaf5e9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

process_checkpoint Ran
ran; our contract draft was wrong, not the code
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/gather_models.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("4037fd6bcb9ca210")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

get_model_info Not yet run
unverified (harvested, no recorded run)
youhuang67/high-resolution-segment-anything/mmsegmentation/.dev_scripts/update_model_index.py
pointer only (licence: NONE); the stored copy get_code serves, from zmhhmz/resfu, is pointer only (licence: NONE) · get_code("75819240e9ae42d0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

ordered_yaml_dump Not yet run
unverified (harvested, no recorded run)
youhuang67/high-resolution-segment-anything/mmdetection/.dev_scripts/gather_models.py
pointer only (licence: NONE) · get_code("8ff99a6bd2ebf598")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, youhuang67/high-resolution-segment-anything 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.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 6 the same month, 1 later) and 3 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
ordered_yaml_dump 31 other papers
28 dated earlier, 3 later
1611.02644 (2016-11)
Multispectral Deep Neural Networks for Pedestrian Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
2105.01928 (2021-05)
Instances as Queries
and 28 more not named here
get_final_iter 13 other papers
12 dated earlier, 1 the same month
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2105.05409 (2021-05)
A Large-Scale Benchmark for Food Image Segmentation
2105.15203 (2021-05)
SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
and 10 more not named here
calculate_file_sha256 9 other papers
8 dated earlier, 1 the same month
2105.15203 (2021-05)
SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers
2303.11633 (2023-03)
Learning Context-Aware Classifier for Semantic Segmentation
2304.13428 (2023-04)
Compensation Learning in Semantic Segmentation
and 6 more not named here
process_checkpoint 6 other papers
5 dated earlier, 1 the same month
2304.13428 (2023-04)
Compensation Learning in Semantic Segmentation
2309.14303 (2023-09)
Dataset Diffusion: Diffusion-based Synthetic Dataset Generation for Pixel-Level Semantic Segmentation
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
and 3 more not named here
dump_yaml_and_check_difference 4 other papers
3 dated earlier, 1 the same month
2309.14303 (2023-09)
Dataset Diffusion: Diffusion-based Synthetic Dataset Generation for Pixel-Level Semantic Segmentation
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
2404.01705 (2024-04)
Samba: Semantic Segmentation of Remotely Sensed Images with State Space Model
and 1 more not named here
get_collection_name_list 4 other papers
3 dated earlier, 1 the same month
2309.14303 (2023-09)
Dataset Diffusion: Diffusion-based Synthetic Dataset Generation for Pixel-Level Semantic Segmentation
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
2404.01705 (2024-04)
Samba: Semantic Segmentation of Remotely Sensed Images with State Space Model
and 1 more not named here
get_model_info 3 other papers
2 dated earlier, 1 the same month
2310.05590 (2023-10)
Perceptual Artifacts Localization for Image Synthesis Tasks
2404.01705 (2024-04)
Samba: Semantic Segmentation of Remotely Sensed Images with State Space Model
2407.02283 (2024-07)
A Refreshed Similarity-based Upsampler for Direct High-Ratio Feature Upsampling

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

The Segment Anything Model (SAM) has advanced interactive segmentation but is limited by the high computational cost on high-resolution images. This requires downsampling to meet GPU constraints, sacrificing the fine-grained details needed for high-precision interactive segmentation. To address SAM's limitations, we focus on visual length extrapolation and propose a lightweight model named HRSAM. The extrapolation enables HRSAM trained on low resolutions to generalize to high resolutions. We begin by finding the link between the extrapolation and attention scores, which leads us to base HRSAM on Swin attention. We then introduce the Flexible Local Attention (FLA) framework, using CUDA-optimized Efficient Memory Attention to accelerate HRSAM. Within FLA, we implement Flash Swin attention, achieving over a 35% speedup compared to traditional Swin attention, and propose a KV-only padding mechanism to enhance extrapolation. We also develop the Cycle-scan module that uses State Space models to efficiently expand HRSAM's receptive field. We further develop the HRSAM++ within FLA by adding an anchor map, providing multi-scale data augmentation for the extrapolation and a larger receptive field at slight computational cost. Experiments show that, under standard training, HRSAMs surpass the previous SOTA with only 38% of the latency. With SAM-distillation, the extrapolation enables HRSAMs to outperform the teacher model at lower latency. Further finetuning achieves performance significantly exceeding the previous SOTA.

For agents

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

get_harvested_code_for_paper("2407.02109")
get_code_for_paper("2407.02109")
have("2407.02109")

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

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

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

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

Connect an agent — have() is free.