출처 : youtu.be/h6s61a_pqfM , cocodataset.org/#format-data
coco dataset format
1. info
: information about dataset
2. licenses
the legal documents that say how you can use these image
3. images
4. annotations
iscrowd : 0 / 1 --> 여러개이거나 뭉쳐있는 경우 ? 1로 나타내는 것 같다.
segmentation : 이미지의 엣지 부분을 나타내는 x, y 좌표들을 모아둔 리스트
만약 중간에 사람과 같은 가려진 부분이 있으면 두개의 파트로 나눠서 자전거 엣지를 구하게 된다.[[], []]로
area : 색칠된 곳의 pixel 갯수 --> 왜 소수점이지 ?
bbox : 박스의 왼쪽 상단, 오른쪽 하단 모서리 x, y 좌표
5. categories
- Object Detection
annotation{
"id": int,
"image_id": int,
"category_id": int,
"segmentation": RLE or [polygon],
"area": float,
"bbox": [x,y,width,height],
"iscrowd": 0 or 1,
}
categories[{
"id": int,
"name": str,
"supercategory": str,
}]
json 파일 한줄로 되어있을때 예쁘게 다시 저장하는 코드
: indent = 4
with open('train_read.json', 'w', encoding='utf-8') as make_file:
json.dump(json_file, make_file, indent = 4)
'study > 인공지능' 카테고리의 다른 글
[데이콘 스터디] 7주차_함수 정리 (2) | 2021.02.16 |
---|---|
[데이콘 스터디] 6주차_함수 정리 (0) | 2021.02.16 |
[데이콘 스터디] 5주차_함수 정리 (0) | 2021.01.27 |
[데이콘 스터디] 4주차_함수 정리 (0) | 2021.01.27 |
[데이콘 스터디] 2주차_ 함수 정리 (0) | 2021.01.27 |