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.

semi_colon

load_boston()

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

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

  • matplotlib을 이용해서 imgs에 전달한 이미지를 한 번에 표시합니다.
  • imgs는 다음 중 하나가 될 수 있습니다.
    • 하나의 NumPy Array, 예) img = cv2.imread('tkv.jpg)
    • List 또는 Tuple에 들어 있는 NumPy Array, 예) [img1, img2], (img1, img2)
    • 제목을 key로 하고 NumPy Array를 value로 하는 Dict, 예) {'img1':img1, 'img2':img2}

getImage(name, dir=None)

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

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

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

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

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

setMouseCallback(img, 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.6.tar.gz (22.3 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.6-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: semi_colon-0.2.6.tar.gz
  • Upload date:
  • Size: 22.3 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.6.tar.gz
Algorithm Hash digest
SHA256 e321e9cc1e02684bffaf058d6ea43f2867752bcbcd2c74819b26c32aebb66ddc
MD5 9f24a5cd95fcb3231698715fe9972762
BLAKE2b-256 cbece741b23f72dab6e59d005806f1d2814e53ceb3c7f704df26166c6db5cec8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: semi_colon-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 21.4 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d1f0ea83d63875e2ab737714ab91aa73ad02df8346c9ae306979e7415d1b1571
MD5 4ef8a5e2840de8c7eb91d437197ab794
BLAKE2b-256 1b0e783bae775135cc74b5b5d04cbc50ee84aa02f6965d81adad7d166f2d5ebe

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