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}
- 하나의 NumPy Array, 예)
getImage(name, dir=None)
- https://github.com/dltpdn/download/tree/master/img 에서
name에 해당하는 이미지를 다운로드 합니다. - 다운로드 위치는
dir를 지정하지 않으면./img/로 고정되어 있습니다.
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
Release history Release notifications | RSS feed
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.7.tar.gz
(22.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file semi_colon-0.2.7.tar.gz.
File metadata
- Download URL: semi_colon-0.2.7.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12e90fe3b3f7f87fb59d8a8dfe9ffefbe89bcfa9b410192be242672655fbd9f1
|
|
| MD5 |
af5df4ffb3adbd6e455c7d97078400b6
|
|
| BLAKE2b-256 |
be0466215ed448741c60d7b3540364ed50b698d55b32c5b061b29e3183dfdbc9
|
File details
Details for the file semi_colon-0.2.7-py3-none-any.whl.
File metadata
- Download URL: semi_colon-0.2.7-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
763ae2440f7b0d75ee30f1264630c4bb9ef2969ee29414cbd0597db2aea38273
|
|
| MD5 |
70a011d8a9db5e51981521bb97daa735
|
|
| BLAKE2b-256 |
f541489ba73fda81c2fe1b28e52eab7059bb5dc06afd6383fb54b60051c57e75
|