roboflow

2024. 10. 25. 16:52·KT AIVLE School/시각지능 딥러닝

 

- 사이트

1. RoboFlow Universe

Roboflow에서 제공하는 오픈 소스 플랫폼으로, annotation을 가지고 있습니다.

 

Roboflow Universe: Open Source Computer Vision Community

Download free, open source datasets and pre-trained computer vision machine learning models.

universe.roboflow.com

 

 

Face Detection Object Detection Dataset and Pre-Trained Model by Mohamed Traore

1369 open source faces images plus a pre-trained Face Detection model and API. Created by Mohamed Traore

universe.roboflow.com

 

2. RoboFlow Project

데이터셋을 만들고 훈련해볼 수 있는 플랫폼으로 annotaion작업과 augmentation 작업을 진행할 수 있습니다.

이미 annotation작업을 진행했다면 txt파일을 사진과 함께 업로드하면 자동으로 인식할 수 있습니다.

 

Roboflow: Computer vision tools for developers and enterprises

Everything you need to build and deploy computer vision models, from automated annotation tools to high-performance deployment solutions.

roboflow.com

 

 

- Universe의 데이터 가져오기

Dataset > YOLOv11 > Show download > Continue

 

 

1. 라이브러리 설치 및 데이터셋 설치하기

!pip install roboflow
from roboflow import Roboflow

##########################################################
## 사용자마다 API 키가 다릅니다
rf = Roboflow(api_key="API키 입력하기")
##########################################################
project = rf.workspace("mohamed-traore-2ekkp").project("face-detection-mik1i")
version = project.version(24)
dataset = version.download("yolov11")

진행 결과

 

2. 모델링 라이브러리, 데이터셋 수정

from ultralytics import YOLO, settings
settings['datasets_dir'] = '/content/'
settings.update()
settings

원래 'datasets_dir' : '/content/datasets'

 

3. 학습하기

 

- 기본 .yaml 파일 

train: ../train/images
val: ../valid/images
test: ../test/images

nc: 1
names: ['face']

roboflow:
  workspace: mohamed-traore-2ekkp
  project: face-detection-mik1i
  version: 24
  license: CC BY 4.0
  url: https://universe.roboflow.com/mohamed-traore-2ekkp/face-detection-mik1i/dataset/24

 

- 수정한 .yaml 파일

train: ../train/images
val: ../test/images
# test:

nc: 1
names: ['face']

roboflow:
  workspace: mohamed-traore-2ekkp
  project: face-detection-mik1i
  version: 24
  license: CC BY 4.0
  url: https://universe.roboflow.com/mohamed-traore-2ekkp/face-detection-mik1i/dataset/24

 

- 모델 구조 및 사전 학습 가중치 선택 후 학습

model = YOLO(model='yolo11n.pt', task='detect')

model.train(model ='/content/yolo11n.pt',
            data='/content/Face-Detection-24/data.yaml', # yaml파일 위치로
            epochs=1, 
            )

 

output layer를 80에서 1로 바꾸기

 

4. 예측하기

result = model.predict(source = '파일위치',
                       conf=0.5, # 기본값
                       iou=0.5, # 기본값이 0.7
                       save=True,
                       line_width=2,
                       )

 

 

- Project로 데이터 만들기

1. 데이터 업데이트 하기

 

 

2. Annotation 작업 진행하기

- 단축키 

D : 움직이기

B :  바운딩 박스치기

완료된 데이터 확인하기

 

3. Train, Validation, Test data로 나누기

 

 

4. Versions 만들기

좌측 Generate항목 선택

증강 작업 가능

 

 

5. 완료 후 다운로드

 

'KT AIVLE School > 시각지능 딥러닝' 카테고리의 다른 글

YOLO  (0) 2024.10.25
Object Detection (객체 탐지)  (0) 2024.10.25
Pretrained CNN - VGG16, InceptionV3  (0) 2024.10.24
100중 분류  (1) 2024.10.24
Transfer Learning  (3) 2024.10.23
'KT AIVLE School/시각지능 딥러닝' 카테고리의 다른 글
  • YOLO
  • Object Detection (객체 탐지)
  • Pretrained CNN - VGG16, InceptionV3
  • 100중 분류
Rabet
Rabet
  • 블로그 메뉴

    • 관리자
    • 글쓰기
  • Rabet
    卯
    Rabet
  • 전체
    오늘
    어제
    • Root (139)
      • KT AIVLE School (85)
        • Start (4)
        • Python프로그래밍 & 라이브러리 (6)
        • 데이터 처리 및 분석 (7)
        • 데이터 분석 및 의미 찾기 (7)
        • 웹크롤링 (10)
        • 머신러닝 (10)
        • 딥러닝 (6)
        • 시각지능 딥러닝 (10)
        • 언어지능 딥러닝 (6)
        • JAVA (4)
        • SQL (2)
        • 가상화 클라우드 (5)
        • 프로젝트 (8)
      • QA (2)
        • 오류사항 (1)
      • 웹공부 (14)
        • SPRING (11)
        • React (1)
      • 코딩 알고리즘 스터디 (23)
      • 코딩테스트 (9)
        • JAVA (8)
        • HTML (1)
      • CS공부 (3)
      • 자격증공부 (3)
        • 정보처리기사 (1)
        • 컴퓨터활용능력 1급 (1)
        • AICE Associate (1)
        • CSTS (0)
  • 인기 글

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.2
Rabet
roboflow
상단으로

티스토리툴바