SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.06499 · 2018

HoVer-Net: Simultaneous Segmentation and Classification of Nuclei in Multi-Tissue Histology Images

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure 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/1812.06499.json · badge: /api/ran/1812.06499.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
vqdang/xy_net canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
uit-hdl/hovernet-pipeline extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
fix_mirror_padding Ran
ran on a synthesized input
vqdang/xy_net/dataloader/augs.py
code served (permissive licence) · get_code("03b0716b2a83b3b1")
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 ndarray, ndim 2, dtype family int, shape (4, 4) 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 numpy as np
from scipy.ndimage import measurements

# Create a small annotation array with some duplicated instances
# The annotation array should contain instance IDs (integers)
# Background is typically 0, and instance IDs start from 1

# Create a simple test case with mirrored/duplicated instances
ann = np.array([
    [0, 1, 1, 0],
    [0, 1, 1, 0],
    [0, 2, 2, 0],
    [0, 2, 2, 0]
], dtype=np.int32)

# Add some disconnected components that would result from mirror padding
# This simulates what happens when mirroring creates duplicate instances
ann[0, 0] = 1  # Disconnected component of instance 1
ann[1, 0] = 1  # Another part of disconnected instance 1
ann[2, 3] = 2  # Disconnected component of instance 2

ARGS = {
    "ann": ann
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family int, shape (4, 4) — shape (4, 4) 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
gaussian_blur Ran
ran on a synthesized input
vqdang/xy_net/dataloader/augs.py
code served (permissive licence) · get_code("42132ecf8f16ab87")
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 list, ndim 4, dtype family int; 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 cv2
import numpy as np
from numpy.random import RandomState

# Create a small valid RGB image (3 channels, uint8)
# Using distinct dimensions: 4x3 (height x width)
img = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create images list with one image
images = [img]

# Create a random state object
random_state = RandomState(seed=42)

# Create placeholder objects for parents and hooks (not used in function body)
parents = []
hooks = []

# Set max_ksize to a reasonable value
max_ksize = 3

ARGS = {
    "images": images,
    "random_state": random_state,
    "parents": parents,
    "hooks": hooks,
    "max_ksize": max_ksize,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 4, dtype family int — a list 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
get_dataset Ran
ran on a synthesized input
vqdang/xy_net/dataset.py
code served (permissive licence) · get_code("b729fa83165b312b")
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 __Kumar. 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 cv2
import numpy as np
import scipy.io as sio
import tempfile
import os

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

# Create a minimal test image file (BGR format for cv2)
test_img = np.random.randint(0, 256, (64, 64, 3), dtype=np.uint8)
test_img_path = os.path.join(temp_dir, 'test_img.jpg')
cv2.imwrite(test_img_path, test_img)

# Create a minimal .mat file with inst_map for Kumar/CPM17
inst_map = np.random.randint(0, 10, (64, 64), dtype=np.int32)
kumar_mat_path = os.path.join(temp_dir, 'kumar_ann.mat')
sio.savemat(kumar_mat_path, {'inst_map': inst_map})

# Create a minimal .mat file with inst_map and type_map for CoNSeP
type_map = np.random.randint(1, 8, (64, 64), dtype=np.int32)
consep_mat_path = os.path.join(temp_dir, 'consep_ann.mat')
sio.savemat(consep_mat_path, {'inst_map': inst_map, 'type_map': type_map})

ARGS = {
    'name': 'kumar'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type __Kumar — a __Kumar output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a __Kumar 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
median_blur Ran
ran on a synthesized input
vqdang/xy_net/dataloader/augs.py
code served (permissive licence) · get_code("70b6e244fd13cd98")
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 list, ndim 4, dtype family int; 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 cv2
import numpy as np
from numpy.random import RandomState

# Create a small test image (uint8, typical for cv2)
test_image = np.random.randint(0, 256, size=(32, 32, 3), dtype=np.uint8)

# Create a random state object
random_state = RandomState(seed=42)

# Parents and hooks are used by imgaug library but not called in this function
parents = []
hooks = []

ARGS = {
    "images": [test_image],
    "random_state": random_state,
    "parents": parents,
    "hooks": hooks,
    "max_ksize": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 4, dtype family int — a list 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
swap_classes Ran
ran; our contract draft was wrong, not the code
uit-hdl/hovernet-pipeline/src/process.py
code served (permissive licence) · get_code("b6c65cc8ae69fb4b")
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 ndarray, ndim 1, dtype family int, shape (7,) 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 numpy as np

torch_manual_seed = 0  # For reproducibility if needed

# Analyzing the function:
# - pred: needs .copy() method and supports indexing with == comparison
# - mapping: dict with k, v pairs
# The function modifies pred in place and returns it

# pred should be a numpy array (has .copy() and supports boolean indexing)
pred = np.array([0, 1, 2, 1, 2, 3, 4], dtype=np.int32)

# mapping: dict that remaps class indices
mapping = {1: 4, 2: 3}

ARGS = {
    "pred": pred,
    "mapping": mapping,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (7,) — shape (7,) 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
to_qupath Not yet run
unverified (harvested, no recorded run)
vqdang/xy_net/convert_format.py
code served (permissive licence) · get_code("12e808c46848e805")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 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.

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

Nuclear segmentation and classification within Haematoxylin & Eosin stained histology images is a fundamental prerequisite in the digital pathology work-flow. The development of automated methods for nuclear segmentation and classification enables the quantitative analysis of tens of thousands of nuclei within a whole-slide pathology image, opening up possibilities of further analysis of large-scale nuclear morphometry. However, automated nuclear segmentation and classification is faced with a major challenge in that there are several different types of nuclei, some of them exhibiting large intra-class variability such as the tumour cells. Additionally, some of the nuclei are often clustered together. To address these challenges, we present a novel convolutional neural network for simultaneous nuclear segmentation and classification that leverages the instance-rich information encoded within the vertical and horizontal distances of nuclear pixels to their centres of mass. These distances are then utilised to separate clustered nuclei, resulting in an accurate segmentation, particularly in areas with overlapping instances. Then for each segmented instance, the network predicts the type of nucleus via a devoted up-sampling branch. We demonstrate state-of-the-art performance compared to other methods on multiple independent multi-tissue histology image datasets. As part of this work, we introduce a new dataset of Haematoxylin & Eosin stained colorectal adenocarcinoma image tiles, containing 24,319 exhaustively annotated nuclei with associated class labels.

For agents

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

get_harvested_code_for_paper("1812.06499")
get_code_for_paper("1812.06499")
have("1812.06499")

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

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

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

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

Connect an agent — have() is free.