| ConvBnReLU3D |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("76a27023b936b897") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 5, dtype family float, shape (2, 4, 8, 8, 8) 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 torch.nn.functional as F
class ConvBnReLU3D(nn.Module):
"""Implements of 3d convolution + batch normalization + ReLU."""
def __init__(self, in_channels: int, out_channels: int, kernel_size: int=3, stride: int=1, pad: int=1, dilation: int=1) -> None:
"""initialization method for convolution3D + batch normalization + relu module
Args:
in_channels: input channel number of convolution layer
out_channels: output channel number of convolution layer
kernel_size: kernel size of convolution layer
stride: stride of convolution layer
pad: pad of convolution layer
dilation: dilation of convolution layer
"""
super(ConvBnReLU3D, self).__init__()
self.conv = nn.Conv3d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, dilation=dilation, bias=False)
self.bn = nn.BatchNorm3d(out_channels)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""forward method"""
return F.relu(self.bn(self.conv(x)), inplace=True)
INIT_ARGS = {
"in_channels": 3,
"out_channels": 4,
"kernel_size": 3,
"stride": 1,
"pad": 1,
"dilation": 1,
}
ARGS = {
"x": torch.randn(2, 3, 8, 8, 8),
}
if __name__ == "__main__":
module = ConvBnReLU3D(**INIT_ARGS)
output = module(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: (2, 4, 8, 8, 8)")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 5, dtype family float, shape (2, 4, 8, 8, 8) — shape (2, 4, 8, 8, 8) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| DepthInitialization |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("92bc6ab66d10346b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn
class DepthInitialization(nn.Module):
"""Initialization Stage Class"""
def __init__(self, patchmatch_num_sample: int=1) -> None:
"""Initialize method
Args:
patchmatch_num_sample: number of samples used in patchmatch process
"""
super(DepthInitialization, self).__init__()
self.patchmatch_num_sample = patchmatch_num_sample
def forward(self, random_initialization: bool, min_depth: torch.Tensor, max_depth: torch.Tensor, height: int, width: int, depth_interval_scale: float, device: torch.device, depth: torch.Tensor=None) -> torch.Tensor:
"""Forward function for depth initialization
Args:
random_initialization: whether to use random initialization
min_depth: minimum virtual depth, (B, )
max_depth: maximum virtual depth, (B, )
height: height of depth map
width: width of depth map
depth_interval_scale: depth interval scale
device: device on which to place tensor
depth: current depth (B, 1, H, W)
Returns:
depth_sample: initialized sample depth map by randomization or local perturbation (B, Ndepth, H, W)
"""
batch_size = min_depth.size()[0]
if random_initialization:
inverse_min_depth = 1.0 / min_depth
inverse_max_depth = 1.0 / max_depth
patchmatch_num_sample = 48
depth_sample = torch.rand(size=(batch_size, patchmatch_num_sample, height, width), device=device) + torch.arange(start=0, end=patchmatch_num_sample, step=1, device=device).view(1, patchmatch_num_sample, 1, 1)
depth_sample = inverse_max_depth.view(batch_size, 1, 1, 1) + depth_sample / patchmatch_num_sample * (inverse_min_depth.view(batch_size, 1, 1, 1) - inverse_max_depth.view(batch_size, 1, 1, 1))
depth_sample = 1.0 / depth_sample
return depth_sample
elif self.patchmatch_num_sample == 1:
return depth.detach()
else:
inverse_min_depth = 1.0 / min_depth
inverse_max_depth = 1.0 / max_depth
depth_sample = torch.arange(-self.patchmatch_num_sample // 2, self.patchmatch_num_sample // 2, 1, device=device).view(1, self.patchmatch_num_sample, 1, 1).repeat(batch_size, 1, height, width).float()
inverse_depth_interval = (inverse_min_depth - inverse_max_depth) * depth_interval_scale
inverse_depth_interval = inverse_depth_interval.view(batch_size, 1, 1, 1)
depth_sample = 1.0 / depth.detach() + inverse_depth_interval * depth_sample
depth_clamped = []
del depth
for k in range(batch_size):
depth_clamped.append(torch.clamp(depth_sample[k], min=inverse_max_depth[k], max=inverse_min_depth[k]).unsqueeze(0))
depth_sample = 1.0 / torch.cat(depth_clamped, dim=0)
del depth_clamped
return depth_sample
INIT_ARGS = {
'patchmatch_num_sample': 3
}
ARGS = {
'random_initialization': True,
'min_depth': torch.tensor([0.5, 0.6]),
'max_depth': torch.tensor([5.0, 6.0]),
'height': 4,
'width': 3,
'depth_interval_scale': 0.1,
'device': torch.device('cpu'),
'depth': torch.ones(2, 1, 4, 3)
}
model = DepthInitialization(**INIT_ARGS)
output = model(**ARGS)
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| FeatureNet |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("ee2cc279bdf6169f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch
import torch.nn as nn
import torch.nn.functional as F
from typing import Any, Dict, List
class ConvBnReLU(nn.Module):
"""Implements 2d Convolution + batch normalization + ReLU"""
def __init__(self, in_channels: int, out_channels: int, kernel_size: int=3, stride: int=1, pad: int=1, dilation: int=1) -> None:
"""initialization method for convolution2D + batch normalization + relu module
Args:
in_channels: input channel number of convolution layer
out_channels: output channel number of convolution layer
kernel_size: kernel size of convolution layer
stride: stride of convolution layer
pad: pad of convolution layer
dilation: dilation of convolution layer
"""
super(ConvBnReLU, self).__init__()
self.conv = nn.Conv2d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, dilation=dilation, bias=False)
self.bn = nn.BatchNorm2d(out_channels)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""forward method"""
return F.relu(self.bn(self.conv(x)), inplace=True)
class FeatureNet(nn.Module):
"""Feature Extraction Network: to extract features of original images from each view"""
def __init__(self):
"""Initialize different layers in the network"""
super(FeatureNet, self).__init__()
self.conv0 = ConvBnReLU(3, 8, 3, 1, 1)
self.conv1 = ConvBnReLU(8, 8, 3, 1, 1)
self.conv2 = ConvBnReLU(8, 16, 5, 2, 2)
self.conv3 = ConvBnReLU(16, 16, 3, 1, 1)
self.conv4 = ConvBnReLU(16, 16, 3, 1, 1)
self.conv5 = ConvBnReLU(16, 32, 5, 2, 2)
self.conv6 = ConvBnReLU(32, 32, 3, 1, 1)
self.conv7 = ConvBnReLU(32, 32, 3, 1, 1)
self.conv8 = ConvBnReLU(32, 64, 5, 2, 2)
self.conv9 = ConvBnReLU(64, 64, 3, 1, 1)
self.conv10 = ConvBnReLU(64, 64, 3, 1, 1)
self.output1 = nn.Conv2d(64, 64, 1, bias=False)
self.inner1 = nn.Conv2d(32, 64, 1, bias=True)
self.inner2 = nn.Conv2d(16, 64, 1, bias=True)
self.output2 = nn.Conv2d(64, 32, 1, bias=False)
self.output3 = nn.Conv2d(64, 16, 1, bias=False)
def forward(self, x: torch.Tensor) -> Dict[str, torch.Tensor]:
"""Forward method
Args:
x: images from a single view, in the shape of [B, C, H, W]. Generally, C=3
Returns:
output_feature: a python dictionary contains extracted features from stage_1 to stage_3
keys are "stage_1", "stage_2", and "stage_3"
"""
output_feature = {}
conv1 = self.conv1(self.conv0(x))
conv4 = self.conv4(self.conv3(self.conv2(conv1)))
conv7 = self.conv7(self.conv6(self.conv5(conv4)))
conv10 = self.conv10(self.conv9(self.conv8(conv7)))
output_feature['stage_3'] = self.output1(conv10)
intra_feat = F.interpolate(conv10, scale_factor=2, mode='bilinear') + self.inner1(conv7)
del conv7, conv10
output_feature['stage_2'] = self.output2(intra_feat)
intra_feat = F.interpolate(intra_feat, scale_factor=2, mode='bilinear') + self.inner2(conv4)
del conv4
output_feature['stage_1'] = self.output3(intra_feat)
del intra_feat
return output_feature
INIT_ARGS = {}
ARGS = {
'x': torch.randn(2, 3, 32, 32)
}
if __name__ == '__main__':
model = FeatureNet(**INIT_ARGS)
model.eval()
output = model(**ARGS)
print("Output keys:", output.keys())
for key, val in output.items():
print(f"{key}: shape {val.shape}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- torch — 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| FeatureWeightNet |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("fde70f1c0e22a3e9") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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
# INIT_ARGS for FeatureWeightNet.__init__
INIT_ARGS = {
'num_feature': 32, # number of features (must be divisible by G)
'neighbors': 9, # number of neighbors to be sampled
'G': 8 # number of groups
}
# Create input tensors for forward method
batch = 2
feature_channel = 32 # must match num_feature
height = 8
width = 6
# ref_feature: [B, C, H, W]
ref_feature = torch.randn(batch, feature_channel, height, width)
# grid: position of sampling points [B, neighbors*H, W, 2]
# Grid values should be in [-1, 1] range for grid_sample
grid = torch.rand(batch, INIT_ARGS['neighbors'] * height, width, 2) * 2 - 1
# ARGS for FeatureWeightNet.forward
ARGS = {
'ref_feature': ref_feature,
'grid': grid
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- Imports
- 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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| PixelwiseNet |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("de28fde5fb92de44") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 5, 6) 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 torch.nn.functional as F
class ConvBnReLU3D(nn.Module):
"""Implements of 3d convolution + batch normalization + ReLU."""
def __init__(self, in_channels: int, out_channels: int, kernel_size: int=3, stride: int=1, pad: int=1, dilation: int=1) -> None:
"""initialization method for convolution3D + batch normalization + relu module
Args:
in_channels: input channel number of convolution layer
out_channels: output channel number of convolution layer
kernel_size: kernel size of convolution layer
stride: stride of convolution layer
pad: pad of convolution layer
dilation: dilation of convolution layer
"""
super(ConvBnReLU3D, self).__init__()
self.conv = nn.Conv3d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, dilation=dilation, bias=False)
self.bn = nn.BatchNorm3d(out_channels)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""forward method"""
return F.relu(self.bn(self.conv(x)), inplace=True)
class PixelwiseNet(nn.Module):
"""Pixelwise Net: A simple pixel-wise view weight network, composed of 1x1x1 convolution layers
and sigmoid nonlinearities, takes the initial set of similarities to output a number between 0 and 1 per
pixel as estimated pixel-wise view weight.
1. The Pixelwise Net is used in adaptive evaluation step
2. The similarity is calculated by ref_feature and other source_features warped by differentiable_warping
3. The learned pixel-wise view weight is estimated in the first iteration of Patchmatch and kept fixed in the
matching cost computation.
"""
def __init__(self, G: int) -> None:
"""Initialize method
Args:
G: the feature channels of input will be divided evenly into G groups
"""
super(PixelwiseNet, self).__init__()
self.conv0 = ConvBnReLU3D(in_channels=G, out_channels=16, kernel_size=1, stride=1, pad=0)
self.conv1 = ConvBnReLU3D(in_channels=16, out_channels=8, kernel_size=1, stride=1, pad=0)
self.conv2 = nn.Conv3d(in_channels=8, out_channels=1, kernel_size=1, stride=1, padding=0)
self.output = nn.Sigmoid()
def forward(self, x1: torch.Tensor) -> torch.Tensor:
"""Forward method for PixelwiseNet
Args:
x1: pixel-wise view weight, [B, G, Ndepth, H, W], where G is the number of groups
"""
x1 = self.conv2(self.conv1(self.conv0(x1))).squeeze(1)
output = self.output(x1)
del x1
output = torch.max(output, dim=1)[0]
return output.unsqueeze(1)
INIT_ARGS = {
'G': 4
}
ARGS = {
'x1': torch.randn(2, 4, 3, 5, 6)
}
if __name__ == '__main__':
model = PixelwiseNet(**INIT_ARGS)
model.eval()
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Output: {output}")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 4, dtype family float, shape (2, 1, 5, 6) — shape (2, 1, 5, 6) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Propagation |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("9dc98895fe55dc6b") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 24, 4, 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
import torch.nn as nn
import torch.nn.functional as F
class Propagation(nn.Module):
""" Propagation module implementation"""
def __init__(self, neighbors: int=16) -> None:
"""Initialize method
Args:
neighbors: number of neighbors to be sampled in propagation
"""
super(Propagation, self).__init__()
self.neighbors = neighbors
def forward(self, batch: int, height: int, width: int, depth_sample: torch.Tensor, grid: torch.Tensor, depth_min: torch.Tensor, depth_max: torch.Tensor, depth_interval_scale: float) -> torch.Tensor:
"""Forward method of adaptive propagation
Args:
batch: batch size,
height: depth map height,
width: depth map width,
depth_sample: sample depth map, in shape of [batch, num_depth, height, width],
grid: 2D grid for bilinear gridding, in shape of [batch, neighbors*H, W, 2]
depth_min: minimum virtual depth, in shape of [batch, ]
depth_max: maximum virtual depth, in shape of [batch, ]
depth_interval_scale: depth virtual interval scale,
Returns:
propagate depth: sorted propagate depth map [batch, num_depth+num_neighbors, height, width]
"""
num_depth = depth_sample.size()[1]
propagate_depth = depth_sample.new_empty(batch, num_depth + self.neighbors, height, width)
propagate_depth[:, 0:num_depth, :, :] = depth_sample
propagate_depth_sample = F.grid_sample(depth_sample[:, num_depth // 2, :, :].unsqueeze(1), grid, mode='bilinear', padding_mode='border')
del grid
propagate_depth_sample = propagate_depth_sample.view(batch, self.neighbors, height, width)
propagate_depth[:, num_depth:, :, :] = propagate_depth_sample
del propagate_depth_sample
propagate_depth, _ = torch.sort(propagate_depth, dim=1)
return propagate_depth
INIT_ARGS = {
'neighbors': 16
}
batch_size = 2
height = 4
width = 3
num_depth = 8
neighbors = 16
ARGS = {
'batch': batch_size,
'height': height,
'width': width,
'depth_sample': torch.randn(batch_size, num_depth, height, width),
'grid': torch.randn(batch_size, neighbors * height, width, 2),
'depth_min': torch.randn(batch_size),
'depth_max': torch.randn(batch_size),
'depth_interval_scale': 1.0
}
if __name__ == '__main__':
model = Propagation(**INIT_ARGS)
output = model(**ARGS)
print(f"Output shape: {output.shape}")
print(f"Expected shape: ({batch_size}, {num_depth + neighbors}, {height}, {width})")
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 4, dtype family float, shape (2, 24, 4, 3) — shape (2, 24, 4, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Regressor |
Ran ran on a synthesized input · constructed an object; no result was computed |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("c2896a15e4b9aa7d") How it ranRan 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 an instance of its own class, Regressor: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
torch.manual_seed(0)
# Analyze the Regressor class:
# - __init__ takes: filter_channels, no_sine, no_residual
# - filter_channels is used in: len(filter_channels), indexing filter_channels[l] and filter_channels[l+1]
# - no_sine is used in: conditional for activation function
# - no_residual is used in: conditionals in __init__ and forward
# - forward takes feature tensor and applies convolutions with optional residual connections
# - feature tensor shape: (batch, channels, length) for Conv1d
# - channels must match filter_channels[0] initially
# - length can be any positive value
# Construct filter_channels: list of channel dimensions
# Start with some channel size, then transition through layers
# Must have at least 2 elements (start and end)
filter_channels = [4, 8, 3] # 4 input channels, 8 hidden, 3 output
# Create a small test feature tensor
# Shape: (batch_size=2, in_channels=4, length=5)
feature = torch.randn(2, 4, 5)
# Test with both no_sine and no_residual combinations
ARGS = {
'filter_channels': filter_channels,
'no_sine': False,
'no_residual': False,
}
- 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 Regressor — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Regressor 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
|
| ResNetMultiImageInput |
Ran ran on a synthesized input · constructed an object; no result was computed |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("0e653694acc4e981") How it ranRan 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 an instance of its own class, ResNetMultiImageInput: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
import torchvision.models as models
torch.manual_seed(0)
# The ResNetMultiImageInput.__init__ calls:
# - super().__init__(block, layers) which expects ResNet block class and layer counts
# - self._make_layer() which is inherited from ResNet and uses the block class
# - Operations on self.modules() for initialization
# We need to provide:
# - block: a ResNet block class (BasicBlock or Bottleneck)
# - layers: list/tuple of 4 integers specifying layer depths
# - num_classes: int (default 1000)
# - num_input_images: int (default 1)
# - channels: int (default 1)
# Use BasicBlock from torchvision as the block
from torchvision.models.resnet import BasicBlock
ARGS = {
"block": BasicBlock,
"layers": [2, 2, 2, 2],
"num_classes": 1000,
"num_input_images": 1,
"channels": 1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ResNetMultiImageInput — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResNetMultiImageInput 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
|
| SimilarityNet |
Ran ran on a synthesized input |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("52e4096f56488419") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, 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 torch.nn as nn
import torch.nn.functional as F
class ConvBnReLU3D(nn.Module):
"""Implements of 3d convolution + batch normalization + ReLU."""
def __init__(self, in_channels: int, out_channels: int, kernel_size: int=3, stride: int=1, pad: int=1, dilation: int=1) -> None:
"""initialization method for convolution3D + batch normalization + relu module
Args:
in_channels: input channel number of convolution layer
out_channels: output channel number of convolution layer
kernel_size: kernel size of convolution layer
stride: stride of convolution layer
pad: pad of convolution layer
dilation: dilation of convolution layer
"""
super(ConvBnReLU3D, self).__init__()
self.conv = nn.Conv3d(in_channels, out_channels, kernel_size, stride=stride, padding=pad, dilation=dilation, bias=False)
self.bn = nn.BatchNorm3d(out_channels)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""forward method"""
return F.relu(self.bn(self.conv(x)), inplace=True)
class SimilarityNet(nn.Module):
"""Similarity Net, used in Evaluation module (adaptive evaluation step)
1. Do 1x1x1 convolution on aggregated cost [B, G, Ndepth, H, W] among all the source views,
where G is the number of groups
2. Perform adaptive spatial cost aggregation to get final cost (scores)
"""
def __init__(self, G: int, neighbors: int=9) -> None:
"""Initialize method
Args:
G: the feature channels of input will be divided evenly into G groups
neighbors: number of neighbors to be sampled
"""
super(SimilarityNet, self).__init__()
self.neighbors = neighbors
self.conv0 = ConvBnReLU3D(in_channels=G, out_channels=16, kernel_size=1, stride=1, pad=0)
self.conv1 = ConvBnReLU3D(in_channels=16, out_channels=8, kernel_size=1, stride=1, pad=0)
self.similarity = nn.Conv3d(in_channels=8, out_channels=1, kernel_size=1, stride=1, padding=0)
def forward(self, x1: torch.Tensor, grid: torch.Tensor, weight: torch.Tensor) -> torch.Tensor:
"""Forward method for SimilarityNet
Args:
x1: [B, G, Ndepth, H, W], where G is the number of groups, aggregated cost among all the source views with
pixel-wise view weight
grid: position of sampling points in adaptive spatial cost aggregation, (B, evaluate_neighbors*H, W, 2)
weight: weight of sampling points in adaptive spatial cost aggregation, combination of
feature weight and depth weight, [B,Ndepth,1,H,W]
Returns:
final cost: in the shape of [B,Ndepth,H,W]
"""
batch, G, num_depth, height, width = x1.size()
x1 = self.similarity(self.conv1(self.conv0(x1))).squeeze(1)
x1 = F.grid_sample(x1, grid, mode='bilinear', padding_mode='border')
x1 = x1.view(batch, num_depth, self.neighbors, height, width)
return torch.sum(x1 * weight, dim=2)
INIT_ARGS = {
'G': 8,
'neighbors': 9
}
batch = 2
G = 8
num_depth = 4
height = 6
width = 5
neighbors = 9
x1 = torch.randn(batch, G, num_depth, height, width)
grid = torch.randn(batch, neighbors * height, width, 2)
weight = torch.randn(batch, num_depth, neighbors, height, width)
ARGS = {
'x1': x1,
'grid': grid,
'weight': weight
}
- Setup block drafted by
- a language model, class construct-then-call prompt, model not recorded
- 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 4, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
- 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
|
| Sine |
Ran ran on a synthesized input · constructed an object; no result was computed |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("a16de707e5586b16") How it ranRan 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 an instance of its own class, Sine: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn
torch.manual_seed(0)
ARGS = {
"w0": 2.0
}
- 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 Sine — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Sine 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
|
| depth_regression |
Ran ran; our contract draft was wrong, not the code |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("e8f9986089f1f048") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 3, 5) 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)
# Construct tiny tensors for depth regression
batch_size = 2
num_depth_values = 4
height = 3
width = 5
# p: probability volume [B, D, H, W]
# Should contain probabilities that sum to 1 along the D dimension
p = torch.rand(batch_size, num_depth_values, height, width)
p = p / p.sum(dim=1, keepdim=True) # normalize to sum to 1 along depth dimension
# depth_values: discrete depth values [B, D]
depth_values = torch.linspace(0.5, 5.0, num_depth_values).unsqueeze(0).expand(batch_size, -1)
ARGS = {
"p": p,
"depth_values": depth_values,
}
- Setup block drafted by
- a language model, Claude Haiku 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 4, dtype family float, shape (2, 1, 3, 5) — shape (2, 1, 3, 5) 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
|
| depth_weight |
Ran ran; our contract draft was wrong, not the code |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("25252e58e3b331de") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 5, dtype family float, shape (2, 4, 3, 3, 5) 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
torch.manual_seed(0)
# Define tensor dimensions
batch = 2
num_depth = 4
height = 3
width = 5
# depth_sample: (B, Ndepth, H, W)
depth_sample = torch.randn(batch, num_depth, height, width) + 1.0 # Add offset to avoid near-zero values
# depth_min: (B,)
depth_min = torch.tensor([0.5, 0.6])
# depth_max: (B,)
depth_max = torch.tensor([5.0, 6.0])
# grid: (B, evaluate_neighbors*H, W, 2)
# This is used with F.grid_sample, so it should contain normalized coordinates in [-1, 1]
evaluate_neighbors = 3
grid = torch.rand(batch, evaluate_neighbors * height, width, 2) * 2 - 1 # Normalized to [-1, 1]
# patchmatch_interval_scale: float
patchmatch_interval_scale = 0.5
# evaluate_neighbors: int
evaluate_neighbors = 3
ARGS = {
"depth_sample": depth_sample,
"depth_min": depth_min,
"depth_max": depth_max,
"grid": grid,
"patchmatch_interval_scale": patchmatch_interval_scale,
"evaluate_neighbors": evaluate_neighbors,
}
- Setup block drafted by
- a language model, Claude Haiku 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 5, dtype family float, shape (2, 4, 3, 3, 5) — shape (2, 4, 3, 3, 5) 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
|
| differentiable_warping |
Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("00b8d4f5fece378f") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 5, dtype family float, shape (2, 4, 3, 8, 6) 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.functional as F
torch.manual_seed(0)
# Define dimensions
batch_size = 2
channels = 4
height = 8
width = 6
num_depth = 3
# src_fea: [B, C, H, W] source features
src_fea = torch.randn(batch_size, channels, height, width)
# src_proj: [B, 4, 4] source camera projection matrix
src_proj = torch.randn(batch_size, 4, 4)
# ref_proj: [B, 4, 4] reference camera projection matrix
ref_proj = torch.randn(batch_size, 4, 4)
# Ensure ref_proj is invertible by making it closer to identity
ref_proj = ref_proj + torch.eye(4).unsqueeze(0) * 2
# depth_samples: [B, Ndepth, H, W] virtual depth layers
depth_samples = torch.randn(batch_size, num_depth, height, width).abs() + 0.5
ARGS = {
"src_fea": src_fea,
"src_proj": src_proj,
"ref_proj": ref_proj,
"depth_samples": depth_samples,
}
- Setup block drafted by
- a language model, Claude Haiku 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 5, dtype family float, shape (2, 4, 3, 8, 6) — shape (2, 4, 3, 8, 6) 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
|
| local_contrast_normalization |
Ran ran; our contract draft was wrong, not the code |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("eb4a51cd37197a6e") How it ranRan 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 4, 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
torch.manual_seed(0)
# Create a small image tensor
# Shape: (batch_size, height, width) - 2D image with batch dimension
image = torch.randn(2, 4, 3)
ARGS = {
"image": image,
"radius": 25,
}
- 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, ndim 4, 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
|
| resnet_multiimage_input |
Ran ran; our contract draft was wrong, not the code |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("98f5a5eb6fec0a91") How it ranRan 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 ResNetMultiImageInput. 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 torch.nn as nn
import torchvision.models as models
torch.manual_seed(0)
ARGS = {
'num_layers': 18,
'pretrained': False,
'num_input_images': 1,
'channels': 1,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type ResNetMultiImageInput — a ResNetMultiImageInput output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNetMultiImageInput 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
|
| DDLMVS |
Not yet run unverified (harvested, no recorded run) |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("89bd4abf9c72da4f") How it ran |
| DepthDecoder |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("7ccf369a6cafb07a") How it ran |
| Evaluation |
Not yet run unverified (harvested, no recorded run) |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("c0aa140f64e3d229") How it ran |
| HSMNet |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("338810fc5e2043a8") How it ran |
| PSMNet |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("15bbcc83e8f87378") How it ran |
| PatchMatch |
Not yet run unverified (harvested, no recorded run) |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("9c7781a0f6f917c4") How it ran |
| Refinement |
Not yet run unverified (harvested, no recorded run) |
Mirmix/ddlmvs/models/net.py code served (permissive licence) · get_code("117934fc23392abd") How it ran |
| ResnetEncoder |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("4af63eb5010aaaf7") How it ran |
| SDFilter |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("12cf0361c050441b") How it ran |
| SMDHead |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("c8a3ac84df7ddea3") How it ran |
| gaussian_blur |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("e2fb247c688205e5") How it ran |
| get_backbone |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("23b44af6dc3ed7f3") How it ran |
| hourglass |
Not yet run unverified (harvested, no recorded run) |
fabiotosi92/SMD-Nets/lib/model/SMDHead.py code served (permissive licence) · get_code("47c7f7aa6bec2802") How it ran |