Tensorflow 11

[object detection] 구글 코랩에서 실행하기

# 텐서플로우 설치 import tensorflow as tf tf.__version__ # COCO API installation : pycocotools 를 설치 => 이미 설치되어있음. ! pip install pycocotools # 깃허브에 있는 레파지토리를, 파이썬의 코드로 clone 하는 방법 import os import pathlib if "models" in pathlib.Path.cwd().parts : while "models" in pathlib.Path.cwd().part : os.chdir('..') elif not pathlib.Path('models').exists() : ! git clone --depth 1 https://github.com/tensorflow/model..

Tensorflow 2021.12.30

[object detection] 동영상 코드

import tensorflow as tf import os import pathlib import numpy as np import zipfile import matplotlib.pyplot as plt from PIL import Image import cv2 from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as viz_utils import time # 내 로컬에 설치된 레이블 파일을, 인덱스와 연결시킨다. PATH_TO_LABELS = 'C:\\Users\\405\\D..

Tensorflow 2021.12.30

[object detection] 카메라 영상 디텍션

import tensorflow as tf import os import pathlib import numpy as np import zipfile import matplotlib.pyplot as plt from PIL import Image import cv2 from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as viz_utils import time # 내 로컬에 설치된 레이블 파일을, 인덱스와 연결시킨다. PATH_TO_LABELS = 'C:\\Users\\405\\D..

Tensorflow 2021.12.30

[object detection] opencv와 텐서플로우의 오브젝트 디텍션 api를 혼합해서, vscode에서 이미지가 제대로 나오도록 하는 방법

import tensorflow as tf import os import pathlib import numpy as np import zipfile import matplotlib.pyplot as plt from PIL import Image import cv2 from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util from object_detection.utils import visualization_utils as viz_utils # 내 로컬에 설치된 레이블 파일을, 인덱스와 연결시킨다. PATH_TO_LABELS = 'C:\\Users\\405\\Documents\\Te..

Tensorflow 2021.12.29