Skip to main content

semi-colon is a utility package for CV, data science, Machine Learning and Deep Learning.

Project description

semi-colon

semi-colon is a utility package for CV, data science, Machine Learning and Deep Learning.

functions

semi_colon.load_boston()

  • scikit-learn.load_boston()을 그대로 복원했습니다.

semi_colon.imshows(imgs, rows=1, cols=None, bgr=True, figsize=None, axis=False)

  • matplotlib을 이용해서 imgs에 전달한 이미지를 한 번에 표시합니다.
  • imgs : 하나의 NumPy Array, List 또는 Tuple에 들어 있는 NumPy Array, 제목을 key로 하는 Dict

semi_colon.download(url, dir=None, file_name=None, extract=False)

  • url에 있는 파일을 dir에 다운로드 합니다.
  • url이 github.com 이라면, master/를 기준으로 자동으로 경로와 파일이름을 지정합니다.
  • extract=True 인 경우 zip, tar 파일은 압축을 해제해 줍니다.

semi_colon.digit_split(image, size=None, flatten=False, border=0, inverse=True)

  • image에 숫자 여러개가 있다면 각각의 숫자 그림파일로 분할해서 리스트로 반환합니다.
  • size는 반환 이미지의 크기를 지정할 수 있습니다.
  • flatten=True은 (1, n) 형태로 변환해서 반환합니다.
  • border는 반환하는 이미지의 테두리 여백을 지정합니다.
  • inverse는 흰색과 검정색을 반전합니다.

semi_colon.draw_bbox(img, x1, y1, x2, y2, text=None, txt_color=(255,255,255), bb_color=None, thickness=2)

  • img에 주어진 좌표로 bounding box를 표시하고 사본을 반환합니다.

get_iou(pred, gt)

  • pred, gt로 IoU를 계산해서 반환합니다.

semi_colon.colab.imMouseCallback(imgs, onmouse=None)

  • 이 함수는 Google Colab에서만 동작합니다.
  • cv2.setMouseCallBack()함수를 Google Colab에서 사용 할 수 있게 수정했습니다.
  • onmouse에 지정할 callback의 parameter는 cv2.setMouseCallback(event, x, y, flag, param)과 동일합니다.
  • callback에 전달되는 param은 기능이 없고 언제나 None입니다.

selectROI(img, callback)

  • 이 함수는 Google Colab에서만 동작합니다.
  • cv2.selectROI()함수를 Google Colab에서 사용 할 수 있게 수정했습니다.
  • img를 표시하고 마우스로 ROI 영역을 선택하고 나면 callback(x,y,w,h)를 호출 합니다.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semi_colon-0.2.5.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semi_colon-0.2.5-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file semi_colon-0.2.5.tar.gz.

File metadata

  • Download URL: semi_colon-0.2.5.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for semi_colon-0.2.5.tar.gz
Algorithm Hash digest
SHA256 6c0e0dd489a0624bfead2d45181cbb6a8a8b0270d2dd6b4c2187e4f1b7eaab45
MD5 0f881bb754192e4450c89d02cbea002b
BLAKE2b-256 3c94829898cb8661d8ea8e58f98ae4e3a2b7de53c05dd5cd5bb818baa625619b

See more details on using hashes here.

File details

Details for the file semi_colon-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: semi_colon-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for semi_colon-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf8ed37abe51d8c89ce2713f56c61d5d76e9ebf9140de2280f7c59a60377ad9
MD5 e5c812821e92d5d33bc5d4d3971d4485
BLAKE2b-256 5a5c3fc6161ff2925342c8b2e635664932e1d174138a414231b9f6f2247f9dd3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page