| absolute_error_loss |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/eval_depth.py code served (permissive licence) · get_code("6dc0a401faa181c2") 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 float32, ndim 0, dtype family float, shape () 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
# Construct small numpy arrays for depth predictions and ground truth
predicted_depth = np.random.randn(2, 4).astype(np.float32)
ground_truth_depth = np.random.randn(2, 4).astype(np.float32)
# Construct parameters: scale (s) and translation (t)
params = (1.5, 0.2)
ARGS = {
"params": params,
"predicted_depth": predicted_depth,
"ground_truth_depth": ground_truth_depth,
}
- 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 float32, ndim 0, dtype family float, shape () — shape () 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
|
| absolute_value_scaling |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/eval_depth.py code served (permissive licence) · get_code("071060ffd8045cf0") 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 1, 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
torch.manual_seed(0)
# Create small tensor arguments for the function
# predicted_depth and ground_truth_depth should be tensors that can be converted to numpy
predicted_depth = torch.randn(2, 4)
ground_truth_depth = torch.randn(2, 4)
# Optional parameters s and t with default values
s = 1.0
t = 0.0
ARGS = {
"predicted_depth": predicted_depth,
"ground_truth_depth": ground_truth_depth,
"s": s,
"t": t
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type tuple, ndim 1, 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
|
| convert_trajectory_to_extrinsic_matrices |
Ran ran on a synthesized input |
Davidyao99/uni4d/dataset_prepare/util.py code served (permissive licence) · get_code("3470bb7f3951b38c") 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 ndarray, ndim 3, dtype family float, shape (2, 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.spatial.transform import Rotation
# Create small sample data
positions = np.array([
[0.0, 0.0, 0.0],
[1.0, 2.0, 3.0]
], dtype=np.float32)
# Create valid quaternions in xyzw format (scipy expects xyzw)
quaternions_xyzw = np.array([
[0.0, 0.0, 0.0, 1.0], # identity quaternion (x, y, z, w)
[0.7071068, 0.0, 0.0, 0.7071068] # 90 degree rotation around x-axis
], dtype=np.float32)
ARGS = {
"positions": positions,
"quaternions_xyzw": quaternions_xyzw
}
- 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 3, dtype family float, shape (2, 4, 4) — shape (2, 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
|
| depth2disparity |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/eval_depth.py code served (permissive licence) · get_code("7d031b19941d06f5") 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 Tensor, ndim 2, dtype family float, shape (2, 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 torch
import numpy as np
torch.manual_seed(0)
# Test with torch.Tensor
depth_tensor = torch.rand(2, 4)
depth_tensor[0, 0] = 0 # Add a zero value to test masking
# Test with numpy.ndarray
depth_numpy = np.random.rand(2, 4).astype(np.float32)
depth_numpy[0, 0] = 0 # Add a zero value to test masking
ARGS = {
"depth": depth_tensor,
"return_mask": False,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- 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 2, dtype family float, shape (2, 4) — shape (2, 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
|
| depth_read |
Ran ran, honoured the contract we drafted |
Davidyao99/uni4d/dataset_prepare/sintel_io.py code served (permissive licence) · get_code("a88685769d5ff548") 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 ndarray, ndim 2, dtype family float, shape (3, 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
import tempfile
import os
TAG_FLOAT = 202021.25
# Create a temporary depth file for testing
temp_dir = tempfile.mkdtemp()
temp_filename = os.path.join(temp_dir, "test_depth.bin")
# Write a valid depth file
width = 4
height = 3
depth_data = np.random.rand(height, width).astype(np.float32)
with open(temp_filename, 'wb') as f:
np.array([TAG_FLOAT], dtype=np.float32).tofile(f)
np.array([width], dtype=np.int32).tofile(f)
np.array([height], dtype=np.int32).tofile(f)
depth_data.tofile(f)
ARGS = {
'filename': temp_filename
}
- 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 2, dtype family float, shape (3, 4) — shape (3, 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
|
| depth_vis |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/util.py code served (permissive licence) · get_code("0cbc9f11c671557a") 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 ndarray, ndim 3, 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
import torch
torch.manual_seed(0)
# Create a small depth map for testing
# The function expects a 2D or 3D array-like object with min/max operations
depth_map = np.random.rand(4, 3).astype(np.float32) * 10
ARGS = {
"depth_map": depth_map
}
- 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 ndarray, ndim 3, dtype family int — no output shape is stated: observe_signature.py could not observe it (no_result)
- 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
|
| disparity_read |
Ran ran on a synthesized input |
Davidyao99/uni4d/dataset_prepare/sintel_io.py code served (permissive licence) · get_code("e162442d5908bd04") 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 ndarray, ndim 2, dtype family float, shape (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 numpy as np
from PIL import Image
import tempfile
import os
# Create a temporary disparity image file
# The function expects an image with 3 channels (RGB)
# disparity = R * 4 + G / 64 + B / 16384
# Create a small test image (4x3 pixels, 3 channels)
disparity_data = np.zeros((4, 3, 3), dtype=np.uint8)
# Set some test values
# R channel: contributes most significantly (multiplied by 4)
disparity_data[:, :, 0] = 10 # Red channel
# G channel: contributes less (divided by 64)
disparity_data[:, :, 1] = 32 # Green channel
# B channel: contributes least (divided by 16384)
disparity_data[:, :, 2] = 64 # Blue channel
# Create a PIL Image and save it to a temporary file
img = Image.fromarray(disparity_data, mode='RGB')
temp_file = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
temp_filename = temp_file.name
temp_file.close()
img.save(temp_filename)
# Define the arguments dictionary
ARGS = {
'filename': temp_filename
}
# Clean up will happen after function execution
# (In practice, you'd want to handle cleanup, but for this setup it's sufficient)
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- PIL, numpy — 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 float, shape (4, 3) — shape (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: none by the harness; any seed is in the setup block
|
| find_closest_index |
Ran ran on a synthesized input |
Davidyao99/uni4d/dataset_prepare/preprocess_tumd.py code served (permissive licence) · get_code("959323d9f907ca0b") 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 int, ndim 0, dtype family int, shape () 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 numpy as np
# Create a sorted list of numbers for testing
L = [1.5, 3.2, 5.7, 8.1, 10.3, 12.9, 15.4]
# Create a target value
t = 5.5
ARGS = {
'L': L,
't': t
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type int, ndim 0, dtype family int, shape () — shape () 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
|
| flow_norm |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/util.py code served (permissive licence) · get_code("0bf2c9084103deab") 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 Tensor, ndim 3, dtype family float, shape (2, 3, 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 torch
torch.manual_seed(0)
# Create a small flow tensor with shape (batch=2, height=3, width=4, channels=2)
# This represents optical flow vectors at each spatial location
flow = torch.randn(2, 3, 4, 2)
# Test both L1 and L2 normalization
is_l1_true = True
is_l1_false = False
ARGS = {
"flow": flow,
"is_l1": is_l1_true
}
- 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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
|
| flow_read |
Ran ran on a synthesized input |
Davidyao99/uni4d/dataset_prepare/sintel_io.py code served (permissive licence) · get_code("a976c9053fc1681f") 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 3, 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 numpy as np
import tempfile
import os
# Create a temporary optical flow file in the correct binary format
def create_test_flow_file():
# Create a temporary file
fd, filepath = tempfile.mkstemp(suffix='.flo')
os.close(fd)
# Write flow data in the correct format
with open(filepath, 'wb') as f:
TAG_FLOAT = 202021.25
width = 4
height = 3
# Write tag
np.array([TAG_FLOAT], dtype=np.float32).tofile(f)
# Write width and height
np.array([width], dtype=np.int32).tofile(f)
np.array([height], dtype=np.int32).tofile(f)
# Write flow data (U and V components interleaved)
# Create random flow values
flow_data = np.random.randn(height, width * 2).astype(np.float32)
flow_data.tofile(f)
return filepath
# Create the test file
test_flow_file = create_test_flow_file()
ARGS = {
'filename': test_flow_file
}
- 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, ndim 3, 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
|
| get_gt |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/eval_pose.py code served (permissive licence) · get_code("af61a94065b60b27") 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. 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
import tempfile
import os
# Create a temporary directory to simulate the video_path structure
temp_dir = tempfile.mkdtemp()
# Create a c2w.npy file with ground truth camera poses
# Shape: (num_frames, 4, 4) for camera-to-world transformation matrices
num_frames = 2
c2w_poses = np.zeros((num_frames, 4, 4))
# Create valid 4x4 transformation matrices (rotation + translation)
for i in range(num_frames):
# 3x3 rotation matrix (identity for simplicity)
c2w_poses[i, :3, :3] = np.eye(3)
# 3x1 translation vector
c2w_poses[i, :3, 3] = np.array([i, i+1, i+2], dtype=np.float32)
# Bottom row for homogeneous coordinates
c2w_poses[i, 3, 3] = 1.0
# Save the c2w poses
np.save(os.path.join(temp_dir, 'c2w.npy'), c2w_poses)
ARGS = {
'video_path': temp_dir
}
- 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 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
|
| get_preds |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/eval_pose.py code served (permissive licence) · get_code("d8e70a5c3026ef98") 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. 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 os
import numpy as np
import tempfile
from scipy.spatial.transform import Rotation as Rot
# Create a temporary directory structure with mock .npz files
temp_dir = tempfile.mkdtemp()
video_path = temp_dir
model_name = "test_model"
experiment_name = "test_experiment"
number_of_frames = 3
# Create the directory structure
images_path = os.path.join(video_path, model_name, experiment_name)
os.makedirs(images_path, exist_ok=True)
# Create mock .npz files with valid rotation matrices and translation vectors
for i in range(number_of_frames):
# Create a valid rotation matrix using scipy
rotation = Rot.from_euler('xyz', [10 * i, 20 * i, 30 * i], degrees=True)
R = rotation.as_matrix() # 3x3 rotation matrix
t = np.array([0.1 * i, 0.2 * i, 0.3 * i]) # 3D translation vector
npz_path = os.path.join(images_path, f'{i:04d}.npz')
np.savez(npz_path, R=R, t=t)
ARGS = {
"video_path": video_path,
"model": model_name,
"experiment_name": experiment_name,
"number_of_frames": number_of_frames,
}
- 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 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
|
| quaternion_to_matrix |
Ran ran; our contract draft was wrong, not the code |
Davidyao99/uni4d/uni4d/variables.py pointer only (licence: MIT); the stored copy get_code serves, from Motion-RAG/MoRAG, is pointer only (licence: GPL-3.0) · get_code("000b3a2e5186a974") How it ranThe 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 Motion-RAG/MoRAG, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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. |
| read_trajectory |
Ran ran on a synthesized input |
Davidyao99/uni4d/dataset_prepare/preprocess_tumd.py code served (permissive licence) · get_code("339c20f5ac123bcc") 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 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 sys
import numpy as np
import tempfile
import os
_EPS = 1e-16
def transform44(l):
"""
Generate a 4x4 homogeneous transformation matrix from a 3D point and unit quaternion.
Input:
l -- tuple consisting of (stamp,tx,ty,tz,qx,qy,qz,qw) where
(tx,ty,tz) is the 3D position and (qx,qy,qz,qw) is the unit quaternion.
Output:
matrix -- 4x4 homogeneous transformation matrix
"""
t = l[1:4]
q = np.array(l[4:8], dtype=np.float64, copy=True)
nq = np.dot(q, q)
if nq < _EPS:
return np.array(((1.0, 0.0, 0.0, t[0]), (0.0, 1.0, 0.0, t[1]), (0.0, 0.0, 1.0, t[2]), (0.0, 0.0, 0.0, 1.0)), dtype=np.float64)
q *= np.sqrt(2.0 / nq)
q = np.outer(q, q)
return np.array(((1.0 - q[1, 1] - q[2, 2], q[0, 1] - q[2, 3], q[0, 2] + q[1, 3], t[0]), (q[0, 1] + q[2, 3], 1.0 - q[0, 0] - q[2, 2], q[1, 2] - q[0, 3], t[1]), (q[0, 2] - q[1, 3], q[1, 2] + q[0, 3], 1.0 - q[0, 0] - q[1, 1], t[2]), (0.0, 0.0, 0.0, 1.0)), dtype=np.float64)
def read_trajectory(filename, matrix=False):
"""
Read a trajectory from a text file.
Input:
filename -- file to be read
matrix -- convert poses to 4x4 matrices
Output:
dictionary of stamped 3D poses
"""
file = open(filename)
data = file.read()
lines = data.replace(',', ' ').replace('\t', ' ').split('\n')
list = [[float(v.strip()) for v in line.split(' ') if v.strip() != ''] for line in lines if len(line) > 0 and line[0] != '#']
list_ok = []
for i, l in enumerate(list):
if l[4:8] == [0, 0, 0, 0]:
continue
isnan = False
for v in l:
if np.isnan(v):
isnan = True
break
if isnan:
sys.stderr.write("Warning: line %d of file '%s' has NaNs, skipping line\n" % (i, filename))
continue
list_ok.append(l)
if matrix:
traj = dict([(l[0], transform44(l[0:])) for l in list_ok])
else:
traj = dict([(l[0], l[1:8]) for l in list_ok])
return traj
# Create a temporary trajectory file
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_filename = temp_file.name
# Write sample trajectory data
# Format: stamp tx ty tz qx qy qz qw
trajectory_data = """# Sample trajectory file
0.0 1.0 2.0 3.0 0.0 0.0 0.7071068 0.7071068
1.0 1.5 2.5 3.5 0.0 0.0 0.7071068 0.7071068
2.0 2.0 3.0 4.0 0.1 0.2 0.7 0.68
"""
temp_file.write(trajectory_data)
temp_file.close()
ARGS = {
"filename": temp_filename,
"matrix": False
}
- 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 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: none by the harness; any seed is in the setup block
|
| signed_expm1 |
Ran ran on a synthesized input |
Davidyao99/uni4d/uni4d/variables.py code served (permissive licence) · get_code("68275a37f3c13918") 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 Tensor, ndim 2, dtype family float, shape (2, 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 torch
torch.manual_seed(0)
# Create a small tensor with mixed positive and negative values
x = torch.tensor([[-2.0, -0.5, 0.0, 1.5], [0.3, -1.2, 2.0, -0.1]], dtype=torch.float32)
ARGS = {
"x": x
}
- 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 2, dtype family float, shape (2, 4) — shape (2, 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
|
| fill_depth_nearest |
Not yet run unverified (harvested, no recorded run) |
Davidyao99/uni4d/uni4d/util.py code served (permissive licence) · get_code("67bfa3f61f955ce1") How it ran |
| hat |
Not yet run unverified (harvested, no recorded run) |
Davidyao99/uni4d/uni4d/variables.py code served (permissive licence) · get_code("9ffd7c4d7dfde3e9") How it ran |
| transform44 |
Not yet run unverified (harvested, no recorded run) |
Davidyao99/uni4d/dataset_prepare/preprocess_tumd.py code served (permissive licence) · get_code("b63ff70118c24067") How it ran |