生活随笔
收集整理的這篇文章主要介紹了
百度EasyDate线上协同数据标注平台使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
文章目錄
- 一、管理員部分
- 1.建立數據集
- 2.建立標注團隊
- 3.發布標注任務
- 4.(補充)數據擴增
- 二、標注員部分
- 1.進入標注
- 2.標注注意
- 1.標注標簽格式
- 2.快捷選項
- 3.暫停標注
- 4.注意框的大小
EasyDate官網
本文以團隊線上協同標注RoboMaster裝甲板為例子
一、管理員部分
管理員負責建立數據集、建立標注團隊、發布標注任務,管理員同時也可以是標注員
1.建立數據集
進入EasyDate官網,選擇新建數據集
選擇數據類型和標注類型,填寫數據集名稱
建立完成,導入數據
支持多種導入方式
推薦使用華為OBS共享導入,本地導入會經常失敗
導入成功
2.建立標注團隊
多人標注==>管理多人標注團隊
新建團隊
確定名稱和成員,郵箱務必填寫正確,發布任務后成員郵箱會收到標注邀請信息 3.
3.發布標注任務
創建多人標注任務
確定好數據集和標注團隊等
發布成功
4.(補充)數據擴增
1.標注前擴增
提供python代碼,標注前擴增使用,每張圖片可以擴增17倍
github倉庫,歡迎star
Dataset_amplification
import cv2
import numpy as np
import os.path
import copy
def SaltAndPepper
(src, percetage
):SP_NoiseImg
= src.copy
()SP_NoiseNum
= int
(percetage * src.shape
[0
] * src.shape
[1
])for i
in range
(SP_NoiseNum
):randR
= np.random.randint
(0, src.shape
[0
] - 1
)randG
= np.random.randint
(0, src.shape
[1
] - 1
)randB
= np.random.randint
(0, 3
)if np.random.randint
(0, 1
) == 0:SP_NoiseImg
[randR, randG, randB
] = 0else:SP_NoiseImg
[randR, randG, randB
] = 255
return SP_NoiseImg
def addGaussianNoise
(image, percetage
):G_Noiseimg
= image.copy
()w
= image.shape
[1
]h
= image.shape
[0
]G_NoiseNum
= int
(percetage * image.shape
[0
] * image.shape
[1
])for i
in range
(G_NoiseNum
):temp_x
= np.random.randint
(0, h
)temp_y
= np.random.randint
(0, w
)G_Noiseimg
[temp_x
][temp_y
][np.random.randint
(3
)] = np.random.randn
(1
)[0
]return G_Noiseimg
def darker
(image, percetage
=0.9
):image_copy
= image.copy
()w
= image.shape
[1
]h
= image.shape
[0
]for xi
in range
(0, w
):
for xj
in range
(0, h
):image_copy
[xj, xi, 0
] = int
(image
[xj, xi, 0
] * percetage
)image_copy
[xj, xi, 1
] = int
(image
[xj, xi, 1
] * percetage
)image_copy
[xj, xi, 2
] = int
(image
[xj, xi, 2
] * percetage
)return image_copy
def brighter
(image, percetage
=1.5
):image_copy
= image.copy
()w
= image.shape
[1
]h
= image.shape
[0
]for xi
in range
(0, w
):
for xj
in range
(0, h
):image_copy
[xj, xi, 0
] = np.clip
(int
(image
[xj, xi, 0
] * percetage
), a_max
=255, a_min
=0
)image_copy
[xj, xi, 1
] = np.clip
(int
(image
[xj, xi, 1
] * percetage
), a_max
=255, a_min
=0
)image_copy
[xj, xi, 2
] = np.clip
(int
(image
[xj, xi, 2
] * percetage
), a_max
=255, a_min
=0
)return image_copy
def rotate
(image, angle, center
=None, scale
=1.0
):
(h, w
) = image.shape
[:2
]if center is None:center
= (w / 2, h / 2
)m
= cv2.getRotationMatrix2D
(center, angle, scale
)rotated
= cv2.warpAffine
(image, m,
(w, h
))return rotated
def flip
(image
):flipped_image
= np.fliplr
(image
)return flipped_image
file_dir
= r
'C:/Users/Quinton/Desktop/sentry/'
for img_name
in os.listdir
(file_dir
):img_path
= file_dir + img_nameimg
= cv2.imread
(img_path
)rotated_90
= rotate
(img, 90
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_r90.jpg', rotated_90
)rotated_180
= rotate
(img, 180
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_r180.jpg', rotated_180
)for img_name
in os.listdir
(file_dir
):img_path
= file_dir + img_nameimg
= cv2.imread
(img_path
)flipped_img
= flip
(img
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_fli.jpg', flipped_img
)img_gauss
= addGaussianNoise
(img, 0.3
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_noise.jpg', img_gauss
)img_darker
= darker
(img
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_darker.jpg', img_darker
)img_brighter
= brighter
(img
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_brighter.jpg', img_brighter
)blur
= cv2.GaussianBlur
(img,
(7, 7
), 1.5
)cv2.imwrite
(file_dir + img_name
[0:-4
] +
'_blur.jpg', blur
)
2.標注后擴增
可以使用此倉庫代碼,標注格式為xml
Dataset-Augment
二、標注員部分
1.進入標注
團隊中標注員會收到郵件,管理員務必填寫正確郵箱
1.進入郵箱,點擊查看
2.啟動標注
2.標注注意
以標注裝甲板為例,提出標注注意事項
1.標注標簽格式
按照如下格式進行標注
例如:紅方英雄1號裝甲板,標注的標簽是8
藍方哨兵機器人,就是選擇0號標簽
一定要注意紅方的標注,極易出現錯誤!!!
2.快捷選項
方向鍵右鍵可下一張圖片
并且會自動保存標注
3.暫停標注
不要點擊提交任務,達咩
可以直接關閉網頁,再次從郵箱邀請進入選擇繼續標注
4.注意框的大小
標注時,框不要太大也不要太小,盡量匹配裝甲板
總結
以上是生活随笔為你收集整理的百度EasyDate线上协同数据标注平台使用的全部內容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。