Update to 2026-09-17 pipeline snapshot; add weights, L20 assets and recording via Git LFS
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>
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(mycpp)
|
||||
|
||||
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fopenmp -g3 -O3")
|
||||
|
||||
|
||||
find_package(Boost REQUIRED COMPONENTS system program_options)
|
||||
find_package(OpenMP REQUIRED)
|
||||
find_package(Eigen3 REQUIRED)
|
||||
find_package(pybind11 REQUIRED)
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${BLAS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
file(GLOB MY_SRC ${PROJECT_SOURCE_DIR}/src/*.cpp)
|
||||
|
||||
set(PYBIND11_CPP_STANDARD -std=c++14)
|
||||
|
||||
pybind11_add_module(mycpp src/app/pybind_api.cpp ${MY_SRC})
|
||||
target_link_libraries(mycpp PRIVATE ${Boost_LIBRARIES} ${OpenMP_CXX_FLAGS} Eigen3::Eigen)
|
||||
@@ -0,0 +1,46 @@
|
||||
/*Copyright (c) 2023, 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
|
||||
|
||||
// STL
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
#include <time.h>
|
||||
#include <queue>
|
||||
#include <climits>
|
||||
#include <tuple>
|
||||
#include <unordered_map>
|
||||
#include <boost/assign.hpp>
|
||||
#include <thread>
|
||||
#include <Eigen/Dense>
|
||||
#include <Eigen/Geometry>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <memory>
|
||||
#include <math.h>
|
||||
#include <boost/format.hpp>
|
||||
#include <numeric>
|
||||
#include <thread>
|
||||
#include <omp.h>
|
||||
|
||||
|
||||
using vectorMatrix4f = std::vector<Eigen::Matrix4f,Eigen::aligned_allocator<Eigen::Matrix4f>>;
|
||||
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
float rotationGeodesicDistance(const Eigen::Matrix3f &R1, const Eigen::Matrix3f &R2);
|
||||
|
||||
} // namespace Utils
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
# Copyright (c) 2023, 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.
|
||||
*/
|
||||
|
||||
|
||||
#include "Utils.h"
|
||||
|
||||
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
|
||||
|
||||
// Difference angle in radian
|
||||
float rotationGeodesicDistance(const Eigen::Matrix3f &R1, const Eigen::Matrix3f &R2)
|
||||
{
|
||||
float cos = ((R1 * R2.transpose()).trace()-1) / 2.0;
|
||||
cos = std::max(std::min(cos, 1.0f), -1.0f);
|
||||
return std::acos(cos);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Utils
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
# Copyright (c) 2023, 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.
|
||||
*/
|
||||
|
||||
|
||||
#include "Utils.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <pybind11/pybind11.h>
|
||||
#include <pybind11/stl.h>
|
||||
#include <pybind11/eigen.h>
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
|
||||
|
||||
//@angle_diff: unit is degree
|
||||
//@dist_diff: unit is meter
|
||||
vectorMatrix4f cluster_poses(float angle_diff, float dist_diff, const vectorMatrix4f &poses_in, const vectorMatrix4f &symmetry_tfs)
|
||||
{
|
||||
printf("num original candidates = %d\n",poses_in.size());
|
||||
vectorMatrix4f poses_out;
|
||||
poses_out.push_back(poses_in[0]);
|
||||
|
||||
const float radian_thres = angle_diff/180.0*M_PI;
|
||||
|
||||
for (int i=1;i<poses_in.size();i++)
|
||||
{
|
||||
bool isnew = true;
|
||||
Eigen::Matrix4f cur_pose = poses_in[i];
|
||||
for (const auto &cluster:poses_out)
|
||||
{
|
||||
Eigen::Vector3f t0 = cluster.block(0,3,3,1);
|
||||
Eigen::Vector3f t1 = cur_pose.block(0,3,3,1);
|
||||
|
||||
if ((t0-t1).norm()>=dist_diff)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for (const auto &tf: symmetry_tfs)
|
||||
{
|
||||
Eigen::Matrix4f cur_pose_tmp = cur_pose*tf;
|
||||
float rot_diff = Utils::rotationGeodesicDistance(cur_pose_tmp.block(0,0,3,3), cluster.block(0,0,3,3));
|
||||
if (rot_diff < radian_thres)
|
||||
{
|
||||
isnew = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isnew) break;
|
||||
}
|
||||
|
||||
if (isnew)
|
||||
{
|
||||
poses_out.push_back(poses_in[i]);
|
||||
}
|
||||
}
|
||||
|
||||
printf("num of pose after clustering: %d\n",poses_out.size());
|
||||
return poses_out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PYBIND11_MODULE(mycpp, m)
|
||||
{
|
||||
m.def("cluster_poses", &cluster_poses, py::call_guard<py::gil_scoped_release>());
|
||||
}
|
||||
Reference in New Issue
Block a user