InterHand26M(handposeX-json 格式)数据集-release >> DataBall
DataBall 助力快速掌握数据集的信息和使用方式,会员享有 百种数据集,持续增加中。
需要更多数据资源和技术解决方案,知识星球: “DataBall - X 数据球(free)”
贵在坚持!
----------------------------------------------------------------
注意:
1)为了方便使用,按照 handposeX json 自定义格式存储
2)使用常见依赖库进行调用,降低数据集使用难度。
3)部分数据集获取请加入:DataBall-X数据球(free)
4)完整数据集获取请加入:DataBall-X数据球(vip)
InterHand26M 数据集官方项目地址:InterHand2.6M dataset | InterHand2.6M
handposeX-json 格式 项目地址: https://github.com/XIAN-HHappy/handpose_x_plus
1、 handposeX json 格式
cx,cy,fx,fy为相机内参。
label:左右手标签
joint3d:三维手部21关键点
vertex3d:三维手mesh网格点
{"author": "XIAN","img_name:": "","cx": 112.0,"cy": 112.0,"fx": 388.9018310596544,"fy": 388.71231836584275,"hands": [{"label": "right","joint3d": [[29.402047395706177,-27.920207008719444,587.0807766914368],······],"vertex3d": [[10.056010007858276,29.915300235152245,-626.9440693855286],······]}]
}
2、脚本运行
# 下载 handposeX json 格式数据集放在根目录
cd script/InterHand26M
python read_InterHand26M.py
read_InterHand26M.py 具体实现如下:
#-*-coding:utf-8-*-
# date:2025-03-02
# Author: XIAN
# function: handposeX json 格式读取数据标签import sys
sys.path.append("./")
import os
import cv2
import json
import numpy as np
import random
from pathlib import Path
import re
'''
function: 绘制二维关键点连线
'''
def draw_joints(img_,hand_,x,y):thick = 2colors = [(0,215,255),(255,115,55),(5,255,55),(25,15,255),(225,15,55)]#cv2.line(img_, (int(hand_['0']['x']+x), int(hand_['0']['y']+y)),(int(hand_['1']['x']+x), int(hand_['1']['y']+y)), colors[0], thick)cv2.line(img_, (int(hand_['1']['x']+x), int(hand_['1']['y']+y)),(int(hand_['2']['x']+x), int(hand_['2']['y']+y)), colors[0], thick)cv2.line(img_, (int(hand_['2']['x']+x), int(hand_['2']['y']+y)),(int(hand_['3']['x']+x), int(hand_['3']['y']+y)), colors[0], thick)cv2.line(img_, (int(hand_['3']['x']+x), int(hand_['3']['y']+y)),(int(hand_['4']['x']+x), int(hand_['4']['y']+y)), colors[0], thick)cv2.line(img_, (int(hand_['0']['x']+x), int(hand_['0']['y']+y)),(int(hand_['5']['x']+x), int(hand_['5']['y']+y)), colors[1], thick)cv2.line(img_, (int(hand_['5']['x']+x), int(hand_['5']['y']+y)),(int(hand_['6']['x']+x), int(hand_['6']['y']+y)), colors[1], thick)cv2.line(img_, (int(hand_['6']['x']+x), int(hand_['6']['y']+y)),(int(hand_['7']['x']+x), int(hand_['7']['y']+y)), colors[1], thick)cv2.line(img_, (int(hand_['7']['x']+x), int(hand_['7']['y']+y)),(int(hand_['8']['x']+x), int(hand_['8']['y']+y)), colors[1], thick)cv2.line(img_, (int(hand_['0']['x']+x), int(hand_['0']['y']+y)),(int(hand_['9']['x']+x), int(hand_['9']['y']+y)), colors[2], thick)cv2.line(img_, (int(hand_['9']['x']+x), int(hand_['9']['y']+y)),(int(hand_['10']['x']+x), int(hand_['10']['y']+y)), colors[2], thick)cv2.line(img_, (int(hand_['10']['x']+x), int(hand_['10']['y']+y)),(int(hand_['11']['x']+x), int(hand_['11']['y']+y)), colors[2], thick)cv2.line(img_, (int(hand_['11']['x']+x), int(hand_['11']['y']+y)),(int(hand_['12']['x']+x), int(hand_['12']['y']+y)), colors[2], thick)cv2.line(img_, (int(hand_['0']['x']+x), int(hand_['0']['y']+y)),(int(hand_['13']['x']+x), int(hand_['13']['y']+y)), colors[3], thick)cv2.line(img_, (int(hand_['13']['x']+x), int(hand_['13']['y']+y)),(int(hand_['14']['x']+x), int(hand_['14']['y']+y)), colors[3], thick)cv2.line(img_, (int(hand_['14']['x']+x), int(hand_['14']['y']+y)),(int(hand_['15']['x']+x), int(hand_['15']['y']+y)), colors[3], thick)cv2.line(img_, (int(hand_['15']['x']+x), int(hand_['15']['y']+y)),(int(hand_['16']['x']+x), int(hand_['16']['y']+y)), colors[3], thick)cv2.line(img_, (int(hand_['0']['x']+x), int(hand_['0']['y']+y)),(int(hand_['17']['x']+x), int(hand_['17']['y']+y)), colors[4], thick)cv2.line(img_, (int(hand_['17']['x']+x), int(hand_['17']['y']+y)),(int(hand_['18']['x']+x), int(hand_['18']['y']+y)), colors[4], thick)cv2.line(img_, (int(hand_['18']['x']+x), int(hand_['18']['y']+y)),(int(hand_['19']['x']+x), int(hand_['19']['y']+y)), colors[4], thick)cv2.line(img_, (int(hand_['19']['x']+x), int(hand_['19']['y']+y)),(int(hand_['20']['x']+x), int(hand_['20']['y']+y)), colors[4], thick)
'''
function: 21个三维关键点转为二维点,并进行绘制
'''
def Draw_KeyPoints3D(img,Joints_,fx,fy,cx,cy):#----------------------------------- 计算 3D到 2D相机的投影X = Joints_[:,0]Y = Joints_[:,1]Z = Joints_[:,2]x_p = X / Zy_p = Y / Z#三维点转为二维点x_2d = fx* x_p + cxy_2d = fy* y_p + cypts2d_list = {}pts2d_ss = []for ii in range(x_2d.shape[0]):x_,y_ = x_2d[ii],y_2d[ii]pts2d_list[str(ii)]={"x":x_,"y":y_}cv2.circle(img, (int(x_),int(y_)), 4, (25,155,255), -1)cv2.circle(img, (int(x_),int(y_)), 2, (255,0,55), -1)pts2d_ss.append((x_,y_))draw_joints(img,pts2d_list,0,0)pts2d_ss = np.array(pts2d_ss)return pts2d_ss
def letterbox(img, height=416, augment=False, color=(266,255,255)):# Resize a rectangular image to a padded squareshape = img.shape[:2] # shape = [height, width]ratio = float(height) / max(shape) # ratio = old / newnew_shape = (round(shape[1] * ratio), round(shape[0] * ratio))dw = (height - new_shape[0]) / 2 # width paddingdh = (height - new_shape[1]) / 2 # height paddingtop, bottom = round(dh - 0.1), round(dh + 0.1)left, right = round(dw - 0.1), round(dw + 0.1)# resize imgif augment:interpolation = np.random.choice([None, cv2.INTER_NEAREST, cv2.INTER_LINEAR,None, cv2.INTER_NEAREST, cv2.INTER_LINEAR,cv2.INTER_AREA, cv2.INTER_CUBIC, cv2.INTER_LANCZOS4])if interpolation is None:img = cv2.resize(img, new_shape)else:img = cv2.resize(img, new_shape, interpolation=interpolation)else:img = cv2.resize(img, new_shape, interpolation=cv2.INTER_NEAREST)# print("resize time:",time.time()-s1)img = cv2.copyMakeBorder(img, top, bottom, left, right, cv2.BORDER_CONSTANT, value=color) # padded squarereturn img
def Draw_Vertex_KeyPoints(img,img_mesh,Vertex,fx_d,fy_d,cx_d,cy_d,triangles_index,RGB_ = (245, 125, 35)):#----------------------------------- 计算 Mano 到 相机的投影Xdc = -Vertex[:,0].reshape(-1)Ydc = -Vertex[:,1].reshape(-1)Zdc = -Vertex[:,2].reshape(-1)x_mano_p = Xdc / Zdcy_mano_p = Ydc / Zdc#点云转为二维图x_mano = fx_d* x_mano_p + cx_dy_mano = fy_d* y_mano_p + cy_dmanopts_list = []mesh_list = []color_rr = (random.randint(100,230),random.randint(120,250),random.randint(100,240))for ii in range(triangles_index.shape[0]):a,b,c = triangles_index[ii]x1_,y1_ = x_mano[a].astype(np.int32),y_mano[a].astype(np.int32)x2_,y2_ = x_mano[b].astype(np.int32),y_mano[b].astype(np.int32)x3_,y3_ = x_mano[c].astype(np.int32),y_mano[c].astype(np.int32)area_ = np.array([[int(x1_), int(y1_)], [int(x2_), int(y2_)], [int(x3_),int(y3_)]])color_ = (255, 0, 0)# cv2.fillPoly(mask_v, [area_], (255))cv2.fillPoly(img_mesh, [area_], color_rr)mesh_list.append(area_)cv2.fillPoly(img, mesh_list, RGB_)def find_jpg_files(root_folder):root_path = Path(root_folder)jpg_files = list(root_path.rglob('*.jpg')) # rglob递归查找return jpg_files
if __name__ == '__main__':root_folder = '../../InterHand2.6M_5fps_batch1-20250302-min/'jpg_files = find_jpg_files(root_folder)path_data = []for path in jpg_files:path_str = str(path)# print(path)# print(type(path))path_img = path_str.replace("\\","/")path_json = re.sub(r"(cam\d+)", r"\1_label", path_img)path_json = path_json.replace(".jpg",".json")if not os.access(path_json,os.F_OK):continue# print(path_img)# print(path_label)path_data.append((path_img,path_json))triangles_index = np.load("../../config/triangles_index.npy").reshape(-1,3)out_cnt = 0hand_cnt = 0for (path_img,path_json) in path_data:if not os.access(path_json,os.F_OK):continuetry:with open(path_json, 'r', encoding='utf-8') as file:data_json = json.load(file)except:print("error ")os.remove(path_img)os.remove(path_json)continuehands_json = data_json["hands"]cx,cy,fx,fy = data_json["cx"],data_json["cy"],data_json["fx"],data_json["fy"]img_ = cv2.imread(path_img)img_joint = img_.copy()img_mesh = img_.copy()img_mask = np.zeros(img_.shape).astype(np.uint8)img_mask[:,:,:]=255for msg_ in hands_json:RGB_ = (245, 55, 133)if msg_["label"] == "left":RGB_ = (25, 255, 133)Joints3D = np.array(msg_["joint3d"])Vertex3D = np.array(msg_["vertex3d"])pts2d_ss = Draw_KeyPoints3D(img_joint,Joints3D,fx,fy,cx,cy)Draw_Vertex_KeyPoints(img_mesh,img_mask,Vertex3D,fx,fy,cx,cy,triangles_index,RGB_ = RGB_)hand_cnt += 1stk_1 = np.hstack((img_,img_joint))stk_2 = np.hstack((img_mesh,img_mask))stk_ = np.vstack((stk_1,stk_2))cv2.namedWindow("img_stk",0)cv2.imshow("img_stk",stk_)# cv2.imwrite("example.jpg",stk_)out_cnt += 1print("---->>> InterHand26M [{}] , hand_num: [{}]".format(out_cnt,hand_cnt))key_id = cv2.waitKey(1)if key_id == 27:break
助力快速掌握数据集的信息和使用方式。
数据可以如此美好!
相关文章:

InterHand26M(handposeX-json 格式)数据集-release >> DataBall
DataBall 助力快速掌握数据集的信息和使用方式,会员享有 百种数据集,持续增加中。 需要更多数据资源和技术解决方案,知识星球: “DataBall - X 数据球(free)” 贵在坚持! ---------------------------------------…...

[Java基础] JVM常量池介绍(BeanUtils.copyProperties(source, target)中的属性值引用的是同一个对象吗)
文章目录 1. JVM内存模型2. 常量池中有什么类型?3. 常量池中真正存储的内容是什么4. 判断一个字符串(引用)是否在常量池中5. BeanUtils.copyProperties(source, target)中的属性值引用的是同一个对象吗?6. 获取堆内存使用情况、非堆内存使用情况 1. JVM内…...
`maturin`是什么:matu rus in python
maturin是什么 maturin 是一个用于构建和发布 Rust 编写的 Python 绑定库的工具。它简化了将 Rust 代码集成到 Python 项目中的过程,支持创建不同类型的 Python 包,如纯 Python 包、包含 **Rust (系统编程语言)**扩展模块的包等。以下为你详细介绍 maturin 的相关信息并举例…...

spring boot整合flyway实现数据的动态维护
1、简单介绍一下flyway Flyway 是一款开源的数据库版本控制工具,主要用于管理数据库结构的变更(如创建表、修改字段、插入数据等)。它通过跟踪和执行版本化的迁移脚本,帮助团队实现数据库变更的自动化。接下来简单介绍一下flyway…...

unity中使用spine详解
一.Spine概述 Spine 是一款针对游戏开发的 2D 骨骼动画编辑工具。 Spine 旨在提供更高效和简洁 的工作流程,以创建游戏所需的动画。 Spine原理:将一个模型,根据动画的需求分成一些骨骼,一个骨骼对应一张贴图,控制骨骼…...

14. LangChain项目实战1——基于公司制度RAG回答机器人
教学视频: 12. 基于Gradio搭建基于公司制度RAG_哔哩哔哩_bilibilihttps://www.bilibili.com/video/BV11VXRYTErZ/ 环境配置: python版本:3.10.8 服务器:Ubuntu 依赖包requirements.txt文件内容: aiofiles23.2.1 …...

利用STM32TIM自制延迟函数实验
一、实验目的 掌握STM32定时器(TIM)的工作原理及配置方法学习使用HAL库实现微秒级/毫秒级延时函数理解定时器中断服务程序的编写规范 二、实验原理 定时器基础: STM32定时器包含向上计数器、向下计数器、中心对齐模式通过预分频器&#x…...

创建一个MCP服务器,并在Cline中使用,增强自定义功能。
MCP介绍 MCP 是一个开放协议,它标准化了应用程序如何向LLMs提供上下文。可以将 MCP 视为 AI 应用程序的 USB-C 端口。正如 USB-C 提供了一种标准化的方法来将您的设备连接到各种外围设备和配件一样,MCP 提供了一种标准化的方法来将 AI 模型连接到不同的…...
Android Activity栈关系解析
在 Android 系统中,这些类共同构成了 Activity 任务栈管理的核心架构。它们的关系可以类比为一栋大楼的管理体系,每个类负责不同层级的任务。以下是它们的详细解释和实际场景示例: 1. ActivityRecord(活动记录) 是什么…...
java使用word模板填充内容,再生成pdf
1.word模板填充内容 使用EasyPoi写入Word文档。 import cn.afterturn.easypoi.word.WordExportUtil; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.apache.poi.xwpf.usermodel.XWPFDocument;import java.io.File; import java…...

回归实战详细代码+解析:预测新冠感染人数
回归实战:预测新冠感染人数 先回顾下回归是个啥玩意 首先需要一组训练集,说人话就是通过一系列x[x1,x2…xn]通过神秘计算得到y的过程,当然人和机器现在都不知道什么计算是什么,这是一个黑箱。 黑箱比喻:把模型想象成自…...

AI人工智能机器学习之聚类分析
1、概要 本篇学习AI人工智能机器学习之聚类分析,以KMeans、AgglomerativeClustering、DBSCAN为例,从代码层面讲述机器学习中的聚类分析。 2、聚类分析 - 简介 聚类分析是一种无监督学习的方法,用于将数据集中的样本划分为不同的组ÿ…...

(下:补充——五个模型的理论基础)深度学习——图像分类篇章
目录 1.1 卷积神经网络基础 3.1 AlexNet网络结构详解与花分类数据集下载 4.1 VGG网络详解及感受野的计算 5.1 GoogLeNet网络详解 6.1 ResNet网络结构,BN以及迁移学习详解 总结(可以直接看总结) 1.1 卷积神经网络基础 视频讲解…...
使用Python自动生成图文并茂的网页分析报告
在数据分析中,不管是市场研究还是科学分析,经常需要使用Python进行数据分析并生成图表报告。一般使用Python生成和展示图表时都是使用matplotlib 库生成静态图片文件,这种方式不便之处是不方便跟动态文字段落结合在一起,也不方便分…...

uniapp-原生android插件开发摘要
uni-app在App侧的原生扩展插件,支持使用java、object-c等原生语言编写,从HBuilderX 3.6起,新增支持了使用uts来开发原生插件。 基础项目 UniPlugin-Hello-AS工程请在App离线SDK中查找 基础项目(App离线SDK)已经配置好了自定义插件所需要的…...

GIT工具学习【1】:基本操作
目录 0.本地代码分区1.配置自己的个人信息(设置一次即可)2.新建仓库3.提交代码到暂存区(加入购物车)4.从暂存区撤回(不会改变工作区文件)5.恢复指定版本(会改变工作区文件)5.1&#…...
《国密算法开发实战:从合规落地到性能优化》
前言 随着信息技术的飞速发展,信息安全已成为全球关注的焦点。在数字化时代,数据的保密性、完整性和可用性直接关系到国家、企业和个人的利益。为了保障信息安全,密码技术作为核心支撑,发挥着至关重要的作用。国密算法,即国家密码算法,是我国自主设计和推广的一系列密码…...

【语法】C++中string类中的两个问题及解答
贴主在学习string类时遇到过两个困扰我的问题,今天拿出来给大家分享一下我是如何解决的 一、扩容时capacity的增长问题 在string的capacity()接口中,调用的是这个string对象的容量(可以存多少个有效字符),而size()是调用的string对象现在有…...
LeetCode-154. 寻找旋转排序数组中的最小值 II
1、题目描述: 已知一个长度为 n 的数组,预先按照升序排列,经由 1 到 n 次 旋转 后,得到输入数组。例如,原数组 nums [0,1,4,4,5,6,7] 在变化后可能得到: 若旋转 4 次,则可以得到 [4,5,6,7,0,…...
2.数据结构:1.Tire 字符串统计
1.Tire 字符串统计 #include<algorithm> #include<cstring> #include<iostream>using namespace std;const int N100010; int son[N][26];//至多 N 层,每一层至多 26 个节点(字母) int cnt[N];//字符串至多 N 个ÿ…...

《从零掌握MIPI CSI-2: 协议精解与FPGA摄像头开发实战》-- CSI-2 协议详细解析 (一)
CSI-2 协议详细解析 (一) 1. CSI-2层定义(CSI-2 Layer Definitions) 分层结构 :CSI-2协议分为6层: 物理层(PHY Layer) : 定义电气特性、时钟机制和传输介质(导线&#…...
【SpringBoot】100、SpringBoot中使用自定义注解+AOP实现参数自动解密
在实际项目中,用户注册、登录、修改密码等操作,都涉及到参数传输安全问题。所以我们需要在前端对账户、密码等敏感信息加密传输,在后端接收到数据后能自动解密。 1、引入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId...

SCAU期末笔记 - 数据分析与数据挖掘题库解析
这门怎么题库答案不全啊日 来简单学一下子来 一、选择题(可多选) 将原始数据进行集成、变换、维度规约、数值规约是在以下哪个步骤的任务?(C) A. 频繁模式挖掘 B.分类和预测 C.数据预处理 D.数据流挖掘 A. 频繁模式挖掘:专注于发现数据中…...
1688商品列表API与其他数据源的对接思路
将1688商品列表API与其他数据源对接时,需结合业务场景设计数据流转链路,重点关注数据格式兼容性、接口调用频率控制及数据一致性维护。以下是具体对接思路及关键技术点: 一、核心对接场景与目标 商品数据同步 场景:将1688商品信息…...

《用户共鸣指数(E)驱动品牌大模型种草:如何抢占大模型搜索结果情感高地》
在注意力分散、内容高度同质化的时代,情感连接已成为品牌破圈的关键通道。我们在服务大量品牌客户的过程中发现,消费者对内容的“有感”程度,正日益成为影响品牌传播效率与转化率的核心变量。在生成式AI驱动的内容生成与推荐环境中࿰…...

DBAPI如何优雅的获取单条数据
API如何优雅的获取单条数据 案例一 对于查询类API,查询的是单条数据,比如根据主键ID查询用户信息,sql如下: select id, name, age from user where id #{id}API默认返回的数据格式是多条的,如下: {&qu…...
全面解析各类VPN技术:GRE、IPsec、L2TP、SSL与MPLS VPN对比
目录 引言 VPN技术概述 GRE VPN 3.1 GRE封装结构 3.2 GRE的应用场景 GRE over IPsec 4.1 GRE over IPsec封装结构 4.2 为什么使用GRE over IPsec? IPsec VPN 5.1 IPsec传输模式(Transport Mode) 5.2 IPsec隧道模式(Tunne…...
JS设计模式(4):观察者模式
JS设计模式(4):观察者模式 一、引入 在开发中,我们经常会遇到这样的场景:一个对象的状态变化需要自动通知其他对象,比如: 电商平台中,商品库存变化时需要通知所有订阅该商品的用户;新闻网站中࿰…...

在 Spring Boot 中使用 JSP
jsp? 好多年没用了。重新整一下 还费了点时间,记录一下。 项目结构: pom: <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://ww…...
Docker拉取MySQL后数据库连接失败的解决方案
在使用Docker部署MySQL时,拉取并启动容器后,有时可能会遇到数据库连接失败的问题。这种问题可能由多种原因导致,包括配置错误、网络设置问题、权限问题等。本文将分析可能的原因,并提供解决方案。 一、确认MySQL容器的运行状态 …...