2023년 5월 30일 화요일

yolov8 학습 및 테스트

# yolov8 설치 후 학습과 테스트의 예


# 경로- g:\2023
> yolo task=detect mode=train model=yolov8m.pt imgsz=1280 data=fire2023_1.yaml
epochs=50 batch=16 name=yolov8m_v8_50e
> yolo predict model=best.pt source=parking_lot5.mp4  # test

댓글 3개:

  1. [Debug Note]
    [https://da2so.tistory.com/80?category=1045512] 사이트를 참고하여,
    yolov8m에 대한 bentoml 서비스를
    d:\2023\bentoml_yolov8\yolov8_bentoml.ipynb와
    service.py로
    생성한 후에

    > bentoml build
    하면, 오류가 나면서 bento파일이 생성되지 않는다.

    가상환경마다 다른 결과가 나오는데,
    nox39, py310에서는 실패했고, torch310에서 성공하였음.
    nox39나 torch310이나,
    torch==1.13.1+cu117
    bentoml==1.0.19
    으로 버전 동일. py310은
    torch==2.0.0+cpu
    bentoml==1.0.15.

    답글삭제
  2. [jupyter notebook 원격 접속법]
    1. https://cyan91.tistory.com/49를 참고하여 우분투 경로 ~/.jupyter에 jupyter_notebook_config.py와 비번이 들어 있는 jupyter_notebook_config.json 파일을 수정함
    2. 방화벽 포트를 열어 줌
    > sudo ufw allow 8888
    3. 서버에서 실행 때
    > jupyter notebook --ip=0.0.0.0
    으로 하여, 모든 곳에서 접속할 수 있게 해 줌

    답글삭제
  3. [Debugging Note]
    라벨링 툴인 labelImg 사용 시, 부류 정보가 저장되는 classes.txt가 초기화되는 오류 해결 방법:
    label이 들어 있는 폴더에 classes.txt파일 복사하고 아래 명령으로 오픈 함.
    > labelimg . classes.txt
    그리고, 이미지 폴더 위치, label 위치 변경해 줌

    [참고] https://github.com/heartexlabs/labelImg/issues/482

    답글삭제