No project description provided
Project description
Installation
Before installing, make sure the following packages are available:
- Numpy
- PyTorch (I recommend to install your PyTorch from following website)
- PIL
- OpenCV
To Install, run the following command:
pip install mctthermalface
Only available in PIP, not in Conda
Usage
For 3 channels image (8-bit)
import mctthermalface
from PIL import Image
detector = mctthermalface.Detector('thermal_face_detection.pt')
img = Image.open("img_path.png")
bbox = detector.detect(img)
Fpr 1 channels image (16-bit) stored in csv
import mctthermalface
import cv2
import numpy as np
detector = mctthermalface.Detector('thermal_face_detection.pt')
img_1channel = np.loadtxt("img_path.csv", delimiter=",")
img_1channel = cv2.normalize(img_1channel, None, 0, 255, cv2.NORM_MINMAX, cv2.CV_8U)
bbox = detector.detect(img_1channel)
Bounding Box Format
bbox = [xmax, xmin, ymax, ymin]
Model Download
Click Here To Download thermal_face_detection.pt
Sample Usage
Check this notebook
Credits
Original Works by: Diza Febriyan Hasal on his Bachelor Thesis about Detecting Face in Thermal Image. Reworked by Martin Clinton Manullang to adjust the performance, adaptability, and compatibility (2023).
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
mctthermalface-0.2.2.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for mctthermalface-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0d167c544ea3ff4fb62745690889f4379777e3033a40f552f3496821689dac |
|
MD5 | a707715502da4ff89a268923fb24eb58 |
|
BLAKE2b-256 | 80108d8598cb36839b964bac50a98f9a0ad9fb69888165acb4e5994576ff8372 |