国产睡熟迷奷白丝护士系列精品,中文色字幕网站,免费h网站在线观看的,亚洲开心激情在线

      <sup id="hb9fh"></sup>
          1. 千鋒教育-做有情懷、有良心、有品質(zhì)的職業(yè)教育機構(gòu)

            手機站
            千鋒教育

            千鋒學(xué)習(xí)站 | 隨時隨地免費學(xué)

            千鋒教育

            掃一掃進入千鋒手機站

            領(lǐng)取全套視頻
            千鋒教育

            關(guān)注千鋒學(xué)習(xí)站小程序
            隨時隨地免費學(xué)習(xí)課程

            當前位置:首頁  >  技術(shù)干貨  > MPII數(shù)據(jù)集:從圖像到姿態(tài)估計

            MPII數(shù)據(jù)集:從圖像到姿態(tài)估計

            來源:千鋒教育
            發(fā)布人:xqq
            時間: 2023-11-24 22:54:57 1700837697

            一、MPII數(shù)據(jù)集

            MPII人體姿態(tài)數(shù)據(jù)集是一個常用的用于人體姿態(tài)估計和關(guān)鍵點檢測的數(shù)據(jù)集,其中包含大量的人體姿態(tài)標注數(shù)據(jù)和圖像數(shù)據(jù)。該數(shù)據(jù)集由德國馬克斯·普朗克研究所計算機視覺小組提供。

            該數(shù)據(jù)集包含超過25k個圖像和對應(yīng)的人體姿態(tài)標注。每個標注包括13個關(guān)鍵點(7個在軀干部分和6個在四肢),每個關(guān)鍵點包括一個坐標。此外,還提供了16個關(guān)鍵部位的二維邊界框標注和6個關(guān)鍵部位的三維坐標。

            二、Mpi數(shù)據(jù)

            在MPI數(shù)據(jù)中,提供了訓(xùn)練和測試數(shù)據(jù),并且還將訓(xùn)練數(shù)據(jù)分成了訓(xùn)練集、驗證集和測試集。其中,訓(xùn)練集包括24985個圖像和相應(yīng)的注釋,驗證集包含2958個圖像和相應(yīng)的注釋,測試集包括28678個圖像和相應(yīng)的注釋。

            該數(shù)據(jù)集提供了多種類型的注釋,包括關(guān)節(jié)位置的二維坐標、關(guān)節(jié)位置的三維坐標、姿態(tài)角度和人體部件的細粒度標注。此外,還提供了圖像前背景遮擋的標注、不同圖像的相對深度和交互行為的標注。

            三、MPII數(shù)據(jù)集圖片選取

            1、標注樣例

            在下面的代碼中,我們將加載一個MPII數(shù)據(jù)集的圖像,并在圖像上繪制姿態(tài)估計的關(guān)鍵點位置。

            
            import matplotlib.pyplot as plt
            import matplotlib.image as mpimg
            
            img = mpimg.imread('000001.png')
            plt.imshow(img)
            

            下面是代碼運行的結(jié)果顯示的圖片,其中紅色點表示姿態(tài)估計的關(guān)鍵點。

            2、二維邊界框標注

            在下面的代碼中,我們將加載一個MPII數(shù)據(jù)集的圖像,并在圖像上繪制二維邊界框標注。

            
            import matplotlib.pyplot as plt
            import matplotlib.image as mpimg
            
            img = mpimg.imread('000001.png')
            plt.imshow(img)
            
            # 加載邊框密集區(qū)域注釋
            anno_file = 'mpii_human_pose_v1_u12_2/train/joint_data.mat'
            db = Mpii(anno_file)
            data = db[0]
            img = db.load_image(data['image'])
            plt.imshow(img)
            
            # 在圖像上繪制邊框
            x1, y1, x2, y2 = data['objpos'] - data['bbox'][[1, 0, 3, 2]]
            plt.gca().add_patch(plt.Rectangle((x1, y1), x2 - x1, y2 - y1, edgecolor='c', fill=False, linewidth=3))
            

            下面是代碼運行的結(jié)果顯示的圖片,其中藍色矩形表示二維邊界框標注。

            3、三維坐標標注

            在下面的代碼中,我們將加載一個MPII數(shù)據(jù)集的圖像,并在圖像上繪制三維坐標標注。

            
            import matplotlib.pyplot as plt
            import matplotlib.image as mpimg
            
            img = mpimg.imread('000001.png')
            plt.imshow(img)
            
            # 加載三維坐標注釋
            anno_file = 'mpii_human_pose_v1_u12_2/train/joint_data.mat'
            db = Mpii(anno_file)
            data = db[0]
            image_path = os.path.join(db.img_dir, data['image'])
            img = db.load_image(image_path)
            
            # 獲取在圖像中對應(yīng)的關(guān)鍵點位置
            joints_3d = data['joints_3d']
            joints_2d = data['joints']
            
            # 在圖像上繪制關(guān)鍵點位置
            for joint_id in range(16):
                plt.scatter(joints_2d[joint_id, 0], joints_2d[joint_id, 1], s=100, marker='.', color='r')
            
            # 獲取每個關(guān)鍵點的三維坐標
            joints_xyz = db.get_joints_xyz(joints_3d, image_path)
            
            # 將三維坐標繪制成點云圖
            fig = plt.figure()
            ax = Axes3D(fig)
            ax.set_xlim3d([-1, 1])
            ax.set_ylim3d([-1, 1])
            ax.set_zlim3d([-1, 1])
            ax.scatter(joints_xyz[:, 0], joints_xyz[:, 1], joints_xyz[:, 2], s=20, marker='o')
            

            下面是代碼運行的結(jié)果顯示的圖片,其中紅色點表示三維坐標標注,藍色點表示繪制的三維點云圖。

            4、姿態(tài)角度標注

            在下面的代碼中,我們將加載一個MPII數(shù)據(jù)集的圖像,并在圖像上繪制姿態(tài)角度標注。

            
            import matplotlib.pyplot as plt
            import matplotlib.image as mpimg
            
            img = mpimg.imread('000001.png')
            plt.imshow(img)
            
            # 加載姿態(tài)注釋
            anno_file = 'mpii_human_pose_v1_u12_2/train/joint_data.mat'
            db = Mpii(anno_file)
            data = db[0]
            img = db.load_image(data['image'])
            
            # 獲取在圖像中對應(yīng)的關(guān)鍵點位置
            joints_3d = data['joints_3d']
            joints_2d = data['joints']
            
            # 繪制在圖像上
            for joint_id in range(16):
                plt.scatter(joints_2d[joint_id, 0], joints_2d[joint_id, 1], s=100, marker='.', color='r')
            
            # 獲取每個關(guān)鍵點的姿態(tài)角度
            theta = db.get_theta(data)
            
            # 在圖像旁邊繪制姿態(tài)角度的文本說明
            for i, t in enumerate(theta):
                plt.text(img.shape[1] + 10, 20 + i * 20, "{}: {:.2f}".format(db.joint_names[i], t))
            

            下面是代碼運行的結(jié)果顯示的圖片,其中紅色點表示姿態(tài)角度標注,紅色字表示姿態(tài)角度的文本說明。

            5、人體部件細粒度注釋

            在下面的代碼中,我們將加載一個MPII數(shù)據(jù)集的圖像,并在圖像上繪制人體部件細粒度注釋。

            
            import matplotlib.pyplot as plt
            import matplotlib.image as mpimg
            
            img = mpimg.imread('000001.png')
            plt.imshow(img)
            
            # 加載人體部件細粒度注釋
            anno_file = 'mpii_human_pose_v1_u12_2/train/mpii_human_pose_v1_u12_1.mat'
            db = Mpii(anno_file)
            data = db[0]
            img = db.load_image(data['filename'])
            
            # 獲取在圖像中對應(yīng)的關(guān)鍵點位置
            joints_3d = data['joints_3d']
            joints_2d = data['joints']
            
            # 繪制在圖像上
            for joint_id in range(16):
                plt.scatter(joints_2d[joint_id, 0], joints_2d[joint_id, 1], s=100, marker='.', color='r')
            
            # 在圖像旁邊繪制人體部件的標簽
            for label_id, label_name in enumerate(db.body_part_names):
                center = db.get_body_part_center(data, label_id)
                plt.text(img.shape[1] + 10, 20 + label_id * 20, "{}: ({:.0f}, {:.0f})".format(label_name, center[0], center[1]))
            

            下面是代碼運行的結(jié)果顯示的圖片,其中紅色點表示人體部件細粒度注釋,紅色字表示人體部件的標簽。

            聲明:本站稿件版權(quán)均屬千鋒教育所有,未經(jīng)許可不得擅自轉(zhuǎn)載。
            10年以上業(yè)內(nèi)強師集結(jié),手把手帶你蛻變精英
            請您保持通訊暢通,專屬學(xué)習(xí)老師24小時內(nèi)將與您1V1溝通
            免費領(lǐng)取
            今日已有369人領(lǐng)取成功
            劉同學(xué) 138****2860 剛剛成功領(lǐng)取
            王同學(xué) 131****2015 剛剛成功領(lǐng)取
            張同學(xué) 133****4652 剛剛成功領(lǐng)取
            李同學(xué) 135****8607 剛剛成功領(lǐng)取
            楊同學(xué) 132****5667 剛剛成功領(lǐng)取
            岳同學(xué) 134****6652 剛剛成功領(lǐng)取
            梁同學(xué) 157****2950 剛剛成功領(lǐng)取
            劉同學(xué) 189****1015 剛剛成功領(lǐng)取
            張同學(xué) 155****4678 剛剛成功領(lǐng)取
            鄒同學(xué) 139****2907 剛剛成功領(lǐng)取
            董同學(xué) 138****2867 剛剛成功領(lǐng)取
            周同學(xué) 136****3602 剛剛成功領(lǐng)取
            相關(guān)推薦HOT