SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.09982 · 2020

Depth Guided Adaptive Meta-Fusion Network for Few-shot Video Recognition

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 4 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/2010.09982.json · badge: /api/ran/2010.09982.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
lovelyqian/AMeFu-Net canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
cosine_dist Ran
ran on a synthesized input
lovelyqian/AMeFu-Net/classifier_with_loss.py
code served (permissive licence) · get_code("d2788db765438921")
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 1, dtype family float, shape (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 torch

torch.manual_seed(0)

# Create two small tensors with distinct dimensions
# x: (2, 4) - 2 vectors of dimension 4
# y: (3, 4) - 3 vectors of dimension 4
x = torch.randn(2, 4)
y = torch.randn(3, 4)

ARGS = {
    "x": x,
    "y": y,
}
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 1, dtype family float, shape (3,) — shape (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
euclidean_dist Ran
ran; our contract draft was wrong, not the code
lovelyqian/AMeFu-Net/classifier_with_loss.py
code served (permissive licence) · get_code("4dd319c45d372246")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create two tensors with different numbers of samples but same feature dimension
# x: n samples with d features
# y: m samples with d features
# Using distinct sizes: n=2, m=3, d=4

x = torch.randn(2, 4)  # 2 samples, 4 features
y = torch.randn(3, 4)  # 3 samples, 4 features

ARGS = {
    'x': x,
    'y': y
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
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 2, dtype family float, shape (2, 3) — shape (2, 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
generate_prototypes_tensor_lowerdim Ran
ran on a synthesized input
lovelyqian/AMeFu-Net/classifier_with_loss.py
code served (permissive licence) · get_code("a89076818baaaeb3")
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. 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 torch

torch.manual_seed(0)

# Create small tensors for support and query sets
# Support set: 4 samples with feature dim 8
support_feature = torch.randn(4, 8)
support_y = torch.tensor([0, 0, 1, 1])

# Query set: 2 samples with feature dim 8
query_feature = torch.randn(2, 8)
query_y = torch.tensor([0, 1])

data = {
    'support_feature': support_feature,
    'support_y': support_y,
    'query_feature': query_feature,
    'query_y': query_y
}

ARGS = {
    'data': data
}
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 tuple — a tuple output has no array shape of its own; none is 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
generate_prototypes_tensor_lowerdim Ran
ran on a synthesized input
lovelyqian/AMeFu-Net/classifier.py
code served (permissive licence) · get_code("cb2913ffa98c1d19")
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. 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 numpy as np

# Set seed for reproducibility
np.random.seed(0)

# Create small support and query sets
# support_feature: list of feature vectors
# support_y: list of class labels
# query_feature: list of query feature vectors
# query_y: list of query class labels

support_feature = [
    np.random.randn(4),  # feature dim = 4
    np.random.randn(4),
    np.random.randn(4),
    np.random.randn(4),
]

support_y = np.array([0, 0, 1, 1])  # 2 classes, 2 samples each

query_feature = [
    np.random.randn(4),
    np.random.randn(4),
]

query_y = np.array([0, 1])

data = {
    'support_feature': support_feature,
    'support_y': support_y,
    'query_feature': query_feature,
    'query_y': query_y,
}

ARGS = {
    'data': data,
}
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 tuple — a tuple output has no array shape of its own; none is 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
parse_args Ran
ran on a synthesized input
lovelyqian/AMeFu-Net/options.py
code served (permissive licence) · get_code("adc0d39a7d675c29")
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 Namespace. 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 sys
import argparse

def parse_args(script):
    parser = argparse.ArgumentParser(description='few-shot script %s' % script)
    parser.add_argument('--dataset', default='kinetics', help='kinetics/ucf/hmdb')
    parser.add_argument('--classifier', default='cosine', help='few shot classifier')
    parser.add_argument('--VIDEO_FRAMES', default=16, type=int, help='number of frames')
    parser.add_argument('--n_way', default=5, type=int, help='class num to classify for FSL')
    if script == 'train':
        parser.add_argument('--mode', default='train', type=str, help='')
        parser.add_argument('--k_shot', default=1, type=int, help='number of labeled data in each class, for training stage')
        parser.add_argument('--save_dir', default='./result/', type=str, help='')
        parser.add_argument('--exp_name', default='tmp', type=str, help='')
        parser.add_argument('--epoch_nums', default=6, type=int, help='')
        parser.add_argument('--train_episodes', default=2000, type=int, help='')
        parser.add_argument('--lr_1', default=2e-05, type=float, help='')
        parser.add_argument('--lr_2', default=2e-05, type=float, help='')
        parser.add_argument('--lr_step_size', default=6, type=int, help='')
        parser.add_argument('--pre_model_rgb', default='', type=str, help='the path of the pretrained rgb-submodel')
        parser.add_argument('--pre_model_depth', default='', type=str, help='the path pf the pretrained depth-submodel')
        parser.add_argument('--pre_model_fusion', default=None, type=str, help='the path of the pretrained whole model')
    elif script == 'test':
        parser.add_argument('--mode', default='test', type=str, help='')
        parser.add_argument('--k_shot', default=1, type=int, help='number of labeled data in each class, for testing stage')
        parser.add_argument('--test_episodes', default=10000, type=int, help='number of episodes for testing')
        parser.add_argument('--ckp', default='', type=str, help='the path of the ckp')
    return parser.parse_args()

ARGS = {
    'script': 'train'
}
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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
transforms Ran
ran on a synthesized input
lovelyqian/AMeFu-Net/utils.py
code served (permissive licence) · get_code("de5649385b5cee5b")
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 Compose. 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 torch
import torchvision.transforms
import torchvision.transforms.functional
from PIL import Image
import random

torch.manual_seed(0)
random.seed(0)

IMG_crop_size = (224, 224)

class ClipRandomCrop(torchvision.transforms.RandomCrop):

    def __init__(self, size):
        self.size = size
        self.i = None
        self.j = None
        self.th = None
        self.tw = None

    def __call__(self, img):
        if self.i is None:
            self.i, self.j, self.th, self.tw = self.get_params(img, output_size=self.size)
        return torchvision.transforms.functional.crop(img, self.i, self.j, self.th, self.tw)

class ClipRandomHorizontalFlip(object):

    def __init__(self, ratio=0.5):
        self.is_flip = random.random() < ratio

    def __call__(self, img):
        if self.is_flip:
            return torchvision.transforms.functional.hflip(img)
        else:
            return img

def transforms(mode):
    if mode == 'train':
        random_crop = ClipRandomCrop(IMG_crop_size)
        flip = ClipRandomHorizontalFlip(ratio=0.5)
        toTensor = torchvision.transforms.ToTensor()
        normalize = torchvision.transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
        return torchvision.transforms.Compose([random_crop, flip, toTensor, normalize])
    else:
        center_crop = torchvision.transforms.CenterCrop(IMG_crop_size)
        toTensor = torchvision.transforms.ToTensor()
        normalize = torchvision.transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
        return torchvision.transforms.Compose([center_crop, toTensor, normalize])

ARGS = {
    'mode': 'train'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
generate_resized_numpy_1d_depth_list Not yet run
unverified (harvested, no recorded run)
lovelyqian/AMeFu-Net/sources/generate_depth.py
code served (permissive licence) · get_code("8bcd2d489feee989")
How it ran

no invocation recorded.

get_video_fusion_from_video_info_rgb_depth_object Not yet run
unverified (harvested, no recorded run)
lovelyqian/AMeFu-Net/utils.py
code served (permissive licence) · get_code("f4fb554c535c6c73")
How it ran

no invocation recorded.

get_video_fusion_from_video_info_rgb_depth_object_multi_depth Not yet run
unverified (harvested, no recorded run)
lovelyqian/AMeFu-Net/utils.py
code served (permissive licence) · get_code("90269b4184e40202")
How it ran

no invocation recorded.

one_shot_classifier_prototype_lowerdim Not yet run
unverified (harvested, no recorded run)
lovelyqian/AMeFu-Net/classifier.py
code served (permissive licence) · get_code("e7727af6f6dd1a13")
How it ran

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, 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 9 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
euclidean_dist 16 other papers
4 dated earlier, 12 later · 2 only as an assembly brick
1703.05175 (2017-03)
Prototypical Networks for Few-shot Learning
1902.08605 (2019-02)
Are Few-Shot Learning Benchmarks too Simple ? Solving them without Task Supervision at Test-Time
1905.13613 (2019-05)
Regression Networks for Meta-Learning Few-Shot Classification
and 13 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

Humans can easily recognize actions with only a few examples given, while the existing video recognition models still heavily rely on the large-scale labeled data inputs. This observation has motivated an increasing interest in few-shot video action recognition, which aims at learning new actions with only very few labeled samples. In this paper, we propose a depth guided Adaptive Meta-Fusion Network for few-shot video recognition which is termed as AMeFu-Net. Concretely, we tackle the few-shot recognition problem from three aspects: firstly, we alleviate this extremely data-scarce problem by introducing depth information as a carrier of the scene, which will bring extra visual information to our model; secondly, we fuse the representation of original RGB clips with multiple non-strictly corresponding depth clips sampled by our temporal asynchronization augmentation mechanism, which synthesizes new instances at feature-level; thirdly, a novel Depth Guided Adaptive Instance Normalization (DGAdaIN) fusion module is proposed to fuse the two-stream modalities efficiently. Additionally, to better mimic the few-shot recognition process, our model is trained in the meta-learning way. Extensive experiments on several action recognition benchmarks demonstrate the effectiveness of our model.

For agents

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

get_harvested_code_for_paper("2010.09982")
get_code_for_paper("2010.09982")
have("2010.09982")

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

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

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

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

Connect an agent — have() is free.