SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.09676 · NeurIPS · 2020

Detecting Hands and Recognizing Physical Contact in the Wild

Minh Hoai, Supreeth Narasimhaswamy, Trung Nguyen

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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 3 have no contract verdict; 1 failure of our instrument; 1 no recorded run), measured 2026-11-22; 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/2010.09676.json · badge: /api/ran/2010.09676.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
cvlab-stonybrook/ContactHands canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
add_legend Ran
ran on a synthesized input
cvlab-stonybrook/ContactHands/detect.py
code served (permissive licence) · get_code("77c948cd3479fb3c")
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 3, dtype family int, shape (150, 100, 3) 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 cv2
import numpy as np

# Create a small valid image in BGR format (as cv2 expects)
# The function expects an image with shape (height, width, 3) with BGR format
# Using a small 100x100 image
im = np.random.randint(0, 256, (100, 100, 3), dtype=np.uint8)

ARGS = {
    'im': im
}
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 ndarray, ndim 3, dtype family int, shape (150, 100, 3) — shape (150, 100, 3) 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
custom_argument_parser Ran
ran on a synthesized input
cvlab-stonybrook/ContactHands/contact_hands_two_stream/engine/custom_arg_parser.py
code served (permissive licence) · get_code("2b7a464d9811d3ee")
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 ArgumentParser. 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 argparse
import sys
import os

def custom_argument_parser(epilog=None):
    """
    Create a parser with some common arguments used by detectron2 users.
    Args:
        epilog (str): epilog passed to ArgumentParser describing the usage.
    Returns:
        argparse.ArgumentParser:
    """
    parser = argparse.ArgumentParser(epilog=epilog or f'\nExamples:\nRun on single machine:\n    $ {sys.argv[0]} --num-gpus 8 --config-file cfg.yaml MODEL.WEIGHTS /path/to/weight.pth\nRun on multiple machines:\n    (machine0)$ {sys.argv[0]} --machine-rank 0 --num-machines 2 --dist-url <URL> [--other-flags]\n    (machine1)$ {sys.argv[0]} --machine-rank 1 --num-machines 2 --dist-url <URL> [--other-flags]\n', formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('--first-config-file', default='', metavar='FILE', help='path to 1st config file (first stream)')
    parser.add_argument('--resume', action='store_true', help='whether to attempt to resume from the checkpoint directory')
    parser.add_argument('--eval-only', action='store_true', help='perform evaluation only')
    parser.add_argument('--num-gpus', type=int, default=1, help='number of gpus *per machine*')
    parser.add_argument('--num-machines', type=int, default=1, help='total number of machines')
    parser.add_argument('--machine-rank', type=int, default=0, help='the rank of this machine (unique per machine)')
    port = 2 ** 15 + 2 ** 14 + hash(os.getuid() if sys.platform != 'win32' else 1) % 2 ** 14
    parser.add_argument('--dist-url', default='tcp://127.0.0.1:{}'.format(port), help='initialization URL for pytorch distributed backend. See https://pytorch.org/docs/stable/distributed.html for details.')
    parser.add_argument('opts', help='Modify config options using the command-line', default=None, nargs=argparse.REMAINDER)
    return parser

ARGS = {
    'epilog': 'Custom epilog for testing purposes'
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
inference_second_stream Ran
ran on a synthesized input
cvlab-stonybrook/ContactHands/train_net.py
code served (permissive licence) · get_code("733ef63ac1f6c46e")
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 2, dtype family float, shape (1, 2) 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 torch.nn as nn
import numpy as np
import cv2
from unittest.mock import Mock, patch
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model that accepts an image array and returns outputs
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 2)
    
    def forward(self, x):
        # x will be a numpy array from cv2.imread
        # Flatten and convert to tensor
        if isinstance(x, np.ndarray):
            x = torch.from_numpy(x).float()
        x = x.reshape(-1)[:4]  # Take first 4 elements
        return self.linear(x.unsqueeze(0))

model = MinimalModel()

# Create a temporary image file for cv2.imread to read
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.png")

# Create a simple test image (3-channel RGB)
test_image = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
cv2.imwrite(temp_image_path, test_image)

# Create inputs list with file reference
inputs = [
    {'file_name': temp_image_path}
]

height = 8
width = 6

ARGS = {
    'model': model,
    'inputs': inputs,
    'height': height,
    'width': width
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (1, 2) — shape (1, 2) 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
voc_ap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
cvlab-stonybrook/ContactHands/contact_hands_two_stream/evaluation/evaluator_ourdata.py
pointer only (licence: MIT); the stored copy get_code serves, from amajee11us/CROWD, is pointer only (licence: NONE) · get_code("611c47c44c424dba")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from amajee11us/CROWD, 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.

inference_second_stream Not yet run
unverified (harvested, no recorded run)
cvlab-stonybrook/ContactHands/detect.py
code served (permissive licence) · get_code("c510b1964cd54629")
How it ran

no invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 4 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
voc_ap 27 other papers
16 dated earlier, 10 later, 1 same year, order not determinable
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
and 24 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

We investigate a new problem of detecting hands and recognizing their physical contact state in unconstrained conditions. This is a challenging inference task given the need to reason beyond the local appearance of hands. The lack of training annotations indicating which object or parts of an object the hand is in contact with further complicates the task. We propose a novel convolutional network based on Mask-RCNN that can jointly learn to localize hands and predict their physical contact to address this problem. The network uses outputs from another object detector to obtain locations of objects present in the scene. It uses these outputs and hand locations to recognize the hand's contact state using two attention mechanisms. The first attention mechanism is based on the hand and a region's affinity, enclosing the hand and the object, and densely pools features from this region to the hand region. The second attention module adaptively selects salient features from this plausible region of contact. To develop and evaluate our method's performance, we introduce a large-scale dataset called ContactHands, containing unconstrained images annotated with hand locations and contact states. The proposed network, including the parameters of attention modules, is end-toend trainable. This network achieves approximately 7% relative improvement over a baseline network that was built on the vanilla Mask-RCNN architecture and trained for recognizing hand contact states. Code and data are available at: https://github.com/cvlab-stonybrook/ContactHands.

For agents

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

get_harvested_code_for_paper("2010.09676")
get_code_for_paper("2010.09676")
have("2010.09676")

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

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

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

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

Connect an agent — have() is free.