ae28d55f81
Source: RGB-D -> Dyn-HaMR -> L20 retargeting -> FoundationPose -> reference repair -> SPIDER, documented in docs/PIPELINE_LATEST.md and docs/SETUP_AND_WEIGHTS.md. Adds FoundationPose and nvdiffrast upstream snapshots, requirements/pipeline_venv.txt and the FoundationPose weight manifest/downloader. Assets (Git LFS): weights/ (WiLoR detector, HandFlow denoiser, UniDepth-L), FoundationPose checkpoints, HaMeR checkpoint, Dyn-HaMR HMP model and BMC constraints, L20 URDF/meshes, the 20260915_171525 D405 recording and the two box CADs. MANO models are not redistributed (third_party/hamer/_DATA/data/mano/README.txt). Environments, caches and run outputs excluded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
51 lines
2.7 KiB
C
51 lines
2.7 KiB
C
// Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
|
//
|
|
// NVIDIA CORPORATION and its licensors retain all intellectual property
|
|
// and proprietary rights in and to this software, related documentation
|
|
// and any modifications thereto. Any use, reproduction, disclosure or
|
|
// distribution of this software and related documentation without an express
|
|
// license agreement from NVIDIA CORPORATION is strictly prohibited.
|
|
|
|
#pragma once
|
|
#include "common.h"
|
|
|
|
//------------------------------------------------------------------------
|
|
// Constants and helpers.
|
|
|
|
#define AA_DISCONTINUITY_KERNEL_BLOCK_WIDTH 32
|
|
#define AA_DISCONTINUITY_KERNEL_BLOCK_HEIGHT 8
|
|
#define AA_ANALYSIS_KERNEL_THREADS_PER_BLOCK 256
|
|
#define AA_MESH_KERNEL_THREADS_PER_BLOCK 256
|
|
#define AA_HASH_ELEMENTS_PER_TRIANGLE(alloc) ((alloc) >= (2 << 25) ? 4 : 8) // With more than 16777216 triangles (alloc >= 33554432) use smallest possible value of 4 to conserve memory, otherwise use 8 for fewer collisions.
|
|
#define AA_LOG_HASH_ELEMENTS_PER_TRIANGLE(alloc) ((alloc) >= (2 << 25) ? 2 : 3)
|
|
#define AA_GRAD_KERNEL_THREADS_PER_BLOCK 256
|
|
|
|
//------------------------------------------------------------------------
|
|
// CUDA kernel params.
|
|
|
|
struct AntialiasKernelParams
|
|
{
|
|
const float* color; // Incoming color buffer.
|
|
const float* rasterOut; // Incoming rasterizer output buffer.
|
|
const int* tri; // Incoming triangle buffer.
|
|
const float* pos; // Incoming position buffer.
|
|
float* output; // Output buffer of forward kernel.
|
|
const float* dy; // Incoming gradients.
|
|
float* gradColor; // Output buffer, color gradient.
|
|
float* gradPos; // Output buffer, position gradient.
|
|
int4* workBuffer; // Buffer for storing intermediate work items. First item reserved for counters.
|
|
uint4* evHash; // Edge-vertex hash.
|
|
int allocTriangles; // Number of triangles accommodated by evHash. Always power of two.
|
|
int numTriangles; // Number of triangles.
|
|
int numVertices; // Number of vertices.
|
|
int width; // Input width.
|
|
int height; // Input height.
|
|
int n; // Minibatch size.
|
|
int channels; // Channel count in color input.
|
|
float xh, yh; // Transfer to pixel space.
|
|
int instance_mode; // 0=normal, 1=instance mode.
|
|
int tri_const; // 1 if triangle array is known to be constant.
|
|
};
|
|
|
|
//------------------------------------------------------------------------
|