当前位置:网站首页>CUB_ Visualization of key points in 200 bird dataset
CUB_ Visualization of key points in 200 bird dataset
2022-07-29 03:44:00 【G fruit】
Key point visualization
1. Key points of birds (15 individual ) The definition of (part/parts.txt)
1 back back
2 beak beak
3 belly abdomen
4 breast Crowns
5 crown chest
6 forehead The forehead
7 left eye The left eye
8 left leg Left leg
9 left wing left wing
10 nape neck
11 right eye Right eye
12 right leg right leg
13 right wing right wing
14 tail tail
15 throat throat
2. Documents of key information (1 Pictures 15 A key point ,part/part_locs.txt)
Every time 1 Yes 5 Column
The first 1 List the number of the picture , The first 2 List the number of key points , The first 3、4 List the abscissa and ordinate of key points , The first 5 Whether the list points are blocked (1 Indicates no occlusion )

3. The number and path of the picture (images.txt)
The first 1 List the number of the picture , The first 2 List the path of the picture

4. Key point visualization complete code
No comments here , I hope you can understand it by yourself
# -*- coding: utf-8 -*-
""" Created on Sat Jul 23 16:55:48 2022 @author: Chengguo """
from tqdm import tqdm
import cv2
from PIL import Image
import numpy as np
import os
import glob
import matplotlib.pyplot as plt
def main():
all_imgs = "E:/DL/FGIR/CUB_200_2011/images.txt"
all_keypoints = "E:/DL/FGIR/CUB_200_2011/parts/part_locs.txt"
keypoint_names = "E:/DL/FGIR/CUB_200_2011/parts/parts.txt"
key_names = []
with open(keypoint_names,"r") as f1:
# There's a problem here , Can't show left and right
key_names = [i.split(" ")[-1][:-1] for i in f1.readlines()]
print(key_names)
keypoints = np.loadtxt(all_keypoints)
print(keypoints)
with open(all_imgs,"r") as f1:
img_dirs = f1.readlines()
# print(img_dirs)
pbar = tqdm(total= len(img_dirs))
for i, img_dir in enumerate(img_dirs):
pbar.update(1)
img_name = "E:/DL/FGIR/CUB_200_2011/images/"+img_dir.split(" ")[-1][:-1]
# print(img_name)
img = cv2.imread(img_name)
for j,k in enumerate(keypoints[i*15:(i+1)*15,2:-1]):
x,y=int(k[0]),int(k[1])
cv2.circle(img,(x,y),radius=2,color=(255,0,0),thickness=2)
cv2.putText(img,key_names[j], (x+1,y+1),cv2.FONT_HERSHEY_SIMPLEX,0.5,(0,255,255),1)
cv2.imshow('image', img)
cv2.waitKey(500)
cv2.destroyAllWindows()
pbar.close()
if __name__ == "__main__":
main()
5. Visualization results
Here the right wing is covered , Its coordinates are displayed in the upper left corner (0,0) spot




边栏推荐
- Environment configuration stepping pit during colab use
- RHCE的at,crontab的基本操作,chrony服务和对称加密和非对称加密
- RTP 发送 和接收 h265
- Simple code implementation of K-means clustering
- 消费行业数字化升级成 “刚需”,weiit 新零售 SaaS 为企业赋能!
- Casbin入门
- VISO fast rendering convolution block
- Connection broken by 'readtimc rt-443): read timed out (read timeout=l5)“)‘: /pac
- How to realize shortcut keys for interface scaling by vscade
- Machine learning [numpy]
猜你喜欢

1. Mx6u driver development-2-led driver

数字孪生实际应用案例-智慧能源篇

Rdkit: introduce smiles code, smart code and Morgan fingerprint (ECFP)

What have I learned from 200 machine learning tools?

向日葵资深产品总监技术分享:“国民远控”如何在AD域环境下应用

Alibaba Font Icon Library Usage and update methods

Multi level wavelet CNN for image restoration
![MOS tube - rapid recovery application notes (II) [parameters and applications]](/img/54/eb040a51304192def8cfb360c7c213.png)
MOS tube - rapid recovery application notes (II) [parameters and applications]
![Machine learning [numpy]](/img/6b/3e7f08c5d379ce35687e4f14545929.png)
Machine learning [numpy]

从2019 年开始,你一定停止使用了这个营销策略…
随机推荐
AI_ Drug: VAE of molecular generation model (I)
深入C语言(2)——结构的定义与使用
Why do programmers so "dislike" the trunk development mode?
Configure vscade to realize ROS writing
(2022杭电多校三)1002-Boss Rush(状压DP+二分)
Inclusion exclusion principle
Getting started with caspin
1.6 example: cifar-10 classification
Introduction and comparison of unicast, multicast (target broadcast, multicast), broadcast, flooding, flooding
SFTP upload error: com.jcraft.jsch JSchException: connection is closed by foreign host
暴力递归到动态规划 01 (机器人移动)
Excel splicing database statement
1. 头文件-注释-命名空间-标准输入输出流
《陌路曾相逢》夏陌沈疏晏_夏陌沈疏晏最新章节
Flutter 启动白屏
从2019 年开始,你一定停止使用了这个营销策略…
Install the packet capturing certificate
3.1 common neural network layer (I) image correlation layer
RHCE's at, crontab's basic operations, the Chrony service, symmetric encryption and asymmetric encryption
Simple understanding of CDN, SDN and QoS