yolov5

(★ 57,917)

PyTorch 기반의 Ultralytics YOLOv5는 객체 검출(object detection), 인스턴스 분할(instance segmentation), 분류(classification), 학습(training), 내보내기(export)를 지원합니다.

파일 탐색기

  • .dockerignore
  • .gitattributes
  • .gitignore
  • AGENTS.md
  • benchmarks.py
  • CITATION.cff
  • CLAUDE.md
  • CONTRIBUTING.md
  • detect.py
  • export.py
  • hubconf.py
  • LICENSE
  • pyproject.toml
  • README.md
  • README.zh-CN.md
  • requirements.txt
  • train.py
  • tutorial.ipynb
  • val.py

# 설치 가이드

python
사전 준비물

설치 및 실행 절차

git clone https://github.com/ultralytics/yolov5

YOLOv5 저장소를 클론합니다.

cd yolov5

프로젝트 디렉토리로 이동합니다.

pip install -r requirements.txt

필수 파이썬 패키지를 설치합니다.

python detect.py --weights yolov5s.pt --source 0

모델을 실행하여 객체 탐지 인퍼런스를 수행합니다.

핵심 명령어

pip install -r requirements.txt

requirements.txt에 명시된 모든 파이썬 의존성 패키지를 설치합니다.

python detect.py --weights yolov5s.pt --source 0

웹캠, 이미지, 비디오 등의 소스에서 객체 탐지 인퍼런스를 실행합니다.

python train.py --img 640 --batch 16 --epochs 5 --data coco128.yaml --weights yolov5s.pt

커스텀 데이터셋을 이용하여 YOLOv5 모델을 학습시킵니다.

python val.py --weights yolov5s.pt --data coco128.yaml

학습된 모델의 성능을 검증합니다.

python export.py --weights yolov5s.pt --include onnx

학습된 모델을 ONNX, TensorRT 등 다른 포맷으로 내보냅니다.

CUDA를 지원하는 NVIDIA GPU 환경에서 실행하는 것을 권장합니다.

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

git clone

설명 보기 ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

pip install

설명 보기 ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

python

설명 보기 ▼

Python 언어 인터프리터.
더 많은 정보: <https://docs.python.org/using/cmdline.html>.

python

REPL(대화형 셸) 시작:

python {{path/to/file.py}}

특정 Python 파일 실행:

python -i {{path/to/file.py}}

특정 Python 파일 실행 후 REPL 시작:

// repository documentation