The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: TypeError
Message: Couldn't cast array of type int64 to null
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2951, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2461, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2486, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 547, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 430, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 343, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2312, in cast_table_to_schema
cast_array_to_feature(
~~~~~~~~~~~~~~~~~~~~~^
table[name] if name in table_column_names else pa.array([None] * len(table), type=schema.field(name).type),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
feature,
^^^^^^^^
)
^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1861, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2068, in cast_array_to_feature
_c(array.field(name) if name in array_fields else null_array, subfeature)
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2068, in cast_array_to_feature
_c(array.field(name) if name in array_fields else null_array, subfeature)
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2118, in cast_array_to_feature
casted_array_values = _c(array.values, feature.feature)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2152, in cast_array_to_feature
return array_cast(
array,
...<2 lines>...
allow_decimal_to_str=allow_decimal_to_str,
)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 1863, in wrapper
return func(array, *args, **kwargs)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2014, in array_cast
raise TypeError(f"Couldn't cast array of type {_short_str(array.type)} to {_short_str(pa_type)}")
TypeError: Couldn't cast array of type int64 to nullNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
IRIS surgical instrument clearing order
96 photographs of five surgical instruments on a table, each with hand-corrected instrument masks and an exact record of which instrument is lying on which, plus an order they can be cleared in without ever lifting one out from under another.
The task: look at the tray, work out the stacking, and give a clearing order.
The point of the dataset is where the ground truth comes from. A robot arm laid every scene out itself, one instrument at a time, in a recorded order β so the layering is not an annotator's judgement about a photograph, it is a log of what the machine did. That is very hard to get from images alone, and it is why these 96 scenes are worth more than 96 hand-labelled ones.
Every mask here was corrected by hand in CVAT, so mask quality is uniform across all three splits.
What a model sees, and what it answers
Input β one image: the survey frame with each instrument outlined and labelled with its class name.
The classes are given rather than asked for. A detector already supplies them at runtime, so the model is left with the part a detector cannot do: working out what is lying across what.
Output β one JSON object, with the keys in this order (u0013_arr1-3-2-4-5):
{"contacts":[["artery_forceps","tissue_forceps"]],
"free":[{"class":"scalpel_handle_large","reason":"isolated"},
{"class":"scalpel_handle_small","reason":"isolated"},
{"class":"surgical_scissors","reason":"isolated"},
{"class":"tissue_forceps","reason":"on_top"}],
"pick_order_classes":["scalpel_handle_small","tissue_forceps",
"surgical_scissors","artery_forceps","scalpel_handle_large"],
"topmost_class":"scalpel_handle_small"}
contacts is [lower, upper] β the first instrument is the one underneath.
reason is on_top when an instrument lies across something, isolated when
it touches nothing at all.
The key order is part of the target
contacts comes before pick_order_classes deliberately. A model generates
left to right and cannot revise, so a justification emitted after the answer
is produced by a model that has already committed to that answer, and will
agree with it whether or not it was right. Emitted before, the order is
generated with the stacking already in context and has to stay consistent with
it.
The pick order is not a fact about the scene; the contact graph is, and the
order follows from it by a rule. So answer.strict_contact_json in each target
is the exact completion text, with the key order frozen into the string.
Parsing and re-serialising it will re-sort the keys and undo this.
Layout
input_data/<cycle>/rgb.png the survey frame
input_data/<cycle>/rgb_annotated.png the model input
input_data/<cycle>/masks.json polygons per instrument, in pixels
input_data/<cycle>/motion.json the arm's log for that cycle
input_data/<cycle>/video.json frame times (the video is not included)
training_target/<cycle>.json labels, both variants, and the completion
validation/β¦ same two folders, held-out cycles
test/β¦ same two folders β sealed, see below
manifest.json, split.csv
Validation and test hold their own inputs and targets, so a held-out cycle is absent from the training folders rather than merely marked.
Splits
| Split | Cycles | Arrangement groups |
|---|---|---|
| train | 61 | 16 |
| validation | 19 | 5 |
| test | 16 | 4 |
Scenes are grouped by arrangement, and every cycle sharing an arrangement goes to the same split. Four cycles of one arrangement spread across train and validation would leak, because they are four photographs of nearly the same scene.
The test split is sealed. Score it once, at the end, with the model and the prompt already fixed. Read it while tuning and it becomes a second validation set, and there is no third.
One disclosure: these same 96 frames were used to train a YOLO segmentation model in the originating project, and the test split here was drawn from that model's train side. For anyone training only on this dataset that makes no difference. It matters only if you run that particular detector into a model and score the pair here, which would read better than it should.
Two label variants, and why you want the strict one
Each target carries as_collected and strict_contact:
strict_contactβ two instruments are in contact when their measured outlines actually reach each other. Use this one. It is whatanswer.strict_contact_jsonis built from.as_collectedβ what the robot's planner recorded, which counts a pair as crossing anywhere within a ~14.45 mm margin. That margin is correct for deciding whether to release an instrument a few millimetres higher, and wrong as a claim about what is touching.
The difference is not small. Across the full capture, 44% of the pairs the
planner recorded as crossing are not touching at all, and over half the scenes
name fewer free instruments than the scene actually had. Train on as_collected
and the model learns to assert, confidently, that two instruments visibly 13 mm
apart are stacked.
Per-pair separations in millimetres are recorded under overlaps_provenance, so
you can re-threshold without re-deriving anything.
Scoring: do not use exact-order accuracy
Several orders are correct for one tray β most of these scenes have three or more instruments that could be taken first β so a model naming an equally valid pick is marked wrong by exact match. It also has no gradient: an early run scored 0 of 9 and the number said nothing about whether it was improving.
Report instead:
- contact F1 (directed) β did it see which instrument lies under which
- contact F1 (undirected) β reported beside it, so finding a crossing and reversing it is separable from missing it
- order validity β is the order a legal clearing of the true stacking
- prefix validity β how many picks before it first digs underneath
- self-consistency β is the order legal under the contacts the model itself claimed; this separates misreading the scene from reasoning badly about what it saw
Baselines you have to beat
Measured on a held-out split, for answers that never looked at the image:
| claims nothing touches | invents a stack | |
|---|---|---|
| contact F1 directed | 0.25 | 0.07 |
| order valid | 0.69 | 0.44 |
| prefix valid (of 5) | 3.75 | 2.89 |
| topmost valid | 0.92 | 0.69 |
| self-consistent | 1.00 | 1.00 |
Read that topmost row before reporting one. A model that ignored the image entirely scores 0.92, because most trays have several valid first picks. Order validity is nearly as soft. Directed contact F1 is the number with real headroom, and the one to watch.
Limitations
- One camera, one table, one lighting regime. 25 arrangement groups from a single cell. Nothing here supports a claim about generalising to another setup β collect independent sessions before making one.
- Five instrument classes, one physical instance of each.
- One observation per scene, taken before any pick. There is no image of the tray after an instrument has been removed.
- Contact is modelled, not observed. It comes from measured instrument outlines placed at known poses, not from the camera. It is as good as those measurements.
- The stacking assumes a pick disturbs nothing else. The arm sets each instrument down from a small height, so this is not guaranteed, and nothing in the dataset can confirm or refute it.
- Masks can span an occluder. Where an instrument was split in two by something lying across it, the hand-corrected pieces were joined into a single ring. 52 such merges across 45 cycles, recorded per cycle.
- Small. 96 scenes is a proof of concept, not a benchmark.
Provenance
Each target carries overlaps_provenance: whether the contacts came from
measured outlines or from a conservative fallback rule, with the clearance,
per-instrument tolerances and angle-sign fit that decided it. All 96 came from
measured outlines.
This is the hand-corrected subset of a larger capture of 181 cycles; the remainder carry detector masks of mixed quality and are not included here.
The motion log for each cycle is included; the video it aligns to is not.
Citation
@misc{iris_instrument_clearing_2026,
title = {IRIS surgical instrument clearing order},
author = {Allelx},
year = {2026},
url = {https://huggingface.co/datasets/Allelx/iris-instrument-clearing},
note = {96 robot-arranged scenes with logged stacking ground truth}
}
- Downloads last month
- 90
