Skip to content

Commit

Permalink
fix:package
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKURA-CAT committed Sep 5, 2024
1 parent c864c8e commit 60ff66a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
3 changes: 3 additions & 0 deletions hivision/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
from .creator import IDCreator, Params as IDParams, Result as IDResult


__all__ = ["IDCreator", "IDParams", "IDResult", "utils", "error"]
9 changes: 9 additions & 0 deletions utils/image_utils.py → hivision/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
@DATE: 2024/9/5 21:52
@File: utils.py
@IDE: pycharm
@Description:
hivision提供的工具函数
"""
from PIL import Image
import io
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions test/create_id_photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
image = cv2.imread(image_path)
creator = IDCreator()
result = creator(image)
cv2.imwrite(os.path.join(output_dir, "result.jpg"), result.standard)
cv2.imwrite(os.path.join(output_dir, "result_hd.jpg"), result.hd)
cv2.imwrite(os.path.join(output_dir, "result.png"), result.standard)
cv2.imwrite(os.path.join(output_dir, "result_hd.png"), result.hd)
10 changes: 0 additions & 10 deletions utils/__init__.py

This file was deleted.

0 comments on commit 60ff66a

Please sign in to comment.