数据集AP_10K 动物姿态估计-动物关键点 >> DataBall

开源数据集AP

P-10K 是第一个用于一般动物姿态估计的大规模基准数据集,以促进动物姿态估计的研究。 AP-10K 包含从 23 个动物科和 60 个物种收集和过滤的 10,015 张图像。

@article{yu2021ap, title={AP-10K: A Benchmark for Animal Pose Estimation in the Wild}, author={Yu, Hang and Xu, Yufei and Zhang, Jing and Zhao, Wei and Guan, Ziyu and Tao, Dacheng}, journal={arXiv preprint arXiv:2108.12617}, year={2021} }

助力快速掌握数据集的信息和使用方式。

可以使用 Python 中的字典和列表来实现这个功能。具体的做法如下: 1. 遍历列表中的每个字典,将time_tag作为键,update_time作为值,存储到一个新的字典中。 2. 对新字典中的每个键进行去重,只保留一个,这里可以使用 set() 函数。 3. 遍历去重后的键,对于每个键,在原来的列表中找到最大的update_time对应的字典,将其存储到一个新的列表中。 示例代码如下: ```python data = [{'time_tag': '2023051706', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051706', 'kp_3h': '0.000', 'ap_3h': '0', 'update_time': '20230517064024'}, {'time_tag': '2023051706', 'kp_3h': '0.333', 'ap_3h': '2', 'update_time': '20230517065422'}, {'time_tag': '2023051709', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051712', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051715', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051718', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051721', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}] # 存储每个time_tag对应的最大update_time的字典 max_dict = {} for d in data: time_tag = d['time_tag'] update_time = int(d['update_time']) if time_tag not in max_dict or max_dict[time_tag] < update_time: max_dict[time_tag] = update_time # 对time_tag去重 unique_time_tag = set(max_dict.keys()) # 存储最终结果 result = [] for time_tag in unique_time_tag: max_update_time = max_dict[time_tag] for d in data: if d['time_tag'] == time_tag and int(d['update_time']) == max_update_time: result.append(d) break # 输出最终结果 print(result) ``` 运行结果为: ``` [{'time_tag': '2023051706', 'kp_3h': '0.333', 'ap_3h': '2', 'update_time': '20230517065422'}, {'time_tag': '2023051709', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051712', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051715', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051718', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}, {'time_tag': '2023051721', 'kp_3h': '-1.000', 'ap_3h': '-1', 'update_time': '20230517000918'}] ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值