SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.19769 · 2024

All-In-One Medical Image Restoration via Task-Adaptive Routing

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2405.19769.json · badge: /api/ran/2405.19769.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
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_MSE Ran
ran, honoured the contract we drafted
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/evaluation/evaluation_metric.py
code served (permissive licence) · get_code("a80807452d9fe8fe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create two small image tensors with distinct shapes for clarity
# Using shape (2, 4) - batch size 2, 4 channels (or features)
img1 = torch.randn(2, 4)
img2 = torch.randn(2, 4)

ARGS = {
    "img1": img1,
    "img2": img2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_RMSE Ran
ran, honoured the contract we drafted
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/evaluation/evaluation_metric.py
code served (permissive licence) · get_code("5b7c1bbe0acccd8a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create two small image tensors for testing
img1_tensor = torch.randn(2, 3, 4, 4)
img2_tensor = torch.randn(2, 3, 4, 4)

# Also create numpy versions for testing
img1_numpy = np.random.randn(2, 3, 4, 4)
img2_numpy = np.random.randn(2, 3, 4, 4)

# Test with torch tensors
ARGS = {
    "img1": img1_tensor,
    "img2": img2_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_measure Ran
ran; our contract draft was wrong, not the code
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/evaluation/evaluation_metric.py
code served (permissive licence) · get_code("02c9d1ab33ee9186")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from math import exp
import torch.nn.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Create small tensor arguments
x = torch.randn(2, 1, 4, 4)
pred = torch.randn(2, 1, 4, 4)
data_range = 1.0

ARGS = {
    'x': x,
    'pred': pred,
    'data_range': data_range
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_bin Ran
ran; our contract draft was wrong, not the code
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/tools.py
code served (permissive licence) · get_code("f3153354bcd66573")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

torch_seed = 0

# Create a temporary directory for test files
temp_dir = tempfile.mkdtemp()

# Create a test pickle file with some sample data
test_data = {
    'key1': 'value1',
    'key2': [1, 2, 3],
    'key3': {'nested': 'dict'}
}

test_path = os.path.join(temp_dir, 'test_data.pkl')
with open(test_path, 'wb') as f:
    pickle.dump(test_data, f)

ARGS = {
    'path': test_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_3d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/model/Model_AMIR.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("82a15cc1e46f7e4d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from gladzhang/Xformer, and GitHub detected no licence in that repository 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.

to_4d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/model/Model_AMIR.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from gladzhang/Xformer, is pointer only (licence: NONE) · get_code("b20f2a5df739a59e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from gladzhang/Xformer, and GitHub detected no licence in that repository 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.

sobelLayer Not yet run
unverified (harvested, no recorded run)
yaziwel/all-in-one-medical-image-restoration-via-task-adaptive-routing/loss/losses.py
code served (permissive licence) · get_code("f5fa1cfd418fa62f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 2 the same month, 2 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
to_3d 80 other papers
45 dated earlier, 2 the same month, 31 later, 2 same year, order not determinable · 18 only as an assembly brick
2003.06792 (2020-03)
Learning Enriched Features for Real Image Restoration and Enhancement
2102.02808 (2021-02)
Multi-Stage Progressive Image Restoration
2111.09881 (2021-11)
Restormer: Efficient Transformer for High-Resolution Image Restoration
and 77 more not named here
to_4d 79 other papers
44 dated earlier, 2 the same month, 31 later, 2 same year, order not determinable · 18 only as an assembly brick
2003.06792 (2020-03)
Learning Enriched Features for Real Image Restoration and Enhancement
2102.02808 (2021-02)
Multi-Stage Progressive Image Restoration
2111.09881 (2021-11)
Restormer: Efficient Transformer for High-Resolution Image Restoration
and 76 more not named here
compute_MSE 1 other paper
1 dated earlier
2106.04650 (2021-06)
TED-net: Convolution-free T2T Vision Transformer-based Encoder-decoder Dilation network for Low-dose CT Denoising
compute_RMSE 1 other paper
1 dated earlier
2106.04650 (2021-06)
TED-net: Convolution-free T2T Vision Transformer-based Encoder-decoder Dilation network for Low-dose CT Denoising

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-23.

Repositories linked to this paper

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

Abstract

Although single-task medical image restoration (MedIR) has witnessed remarkable success, the limited generalizability of these methods poses a substantial obstacle to wider application. In this paper, we focus on the task of all-in-one medical image restoration, aiming to address multiple distinct MedIR tasks with a single universal model. Nonetheless, due to significant differences between different MedIR tasks, training a universal model often encounters task interference issues, where different tasks with shared parameters may conflict with each other in the gradient update direction. This task interference leads to deviation of the model update direction from the optimal path, thereby affecting the model's performance. To tackle this issue, we propose a task-adaptive routing strategy, allowing conflicting tasks to select different network paths in spatial and channel dimensions, thereby mitigating task interference. Experimental results demonstrate that our proposed \textbf{A}ll-in-one \textbf{M}edical \textbf{I}mage \textbf{R}estoration (\textbf{AMIR}) network achieves state-of-the-art performance in three MedIR tasks: MRI super-resolution, CT denoising, and PET synthesis, both in single-task and all-in-one settings. The code and data will be available at \href{https://github.com/Yaziwel/All-In-One-Medical-Image-Restoration-via-Task-Adaptive-Routing.git}{https://github.com/Yaziwel/AMIR}.

For agents

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

get_harvested_code_for_paper("2405.19769")
get_code_for_paper("2405.19769")
have("2405.19769")

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

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

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

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

Connect an agent — have() is free.