Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true -diff
965 changes: 965 additions & 0 deletions pixi.lock

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[workspace]
authors = ["Hameer Abbasi <2190658+hameerabbasi@users.noreply.github.com>"]
channels = ["conda-forge"]
name = "insightface"
platforms = ["osx-arm64"]
version = "0.1.0"

[tasks]

[dependencies]
python = "<3.14"

[pypi-dependencies]
insightface = { path = "./python-package", editable = true}
11 changes: 11 additions & 0 deletions python-package/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Images
include insightface/data/images/*.jpg
include insightface/data/images/*.png

# Mesh
include insightface/thirdparty/face3d/mesh/cython/*.h
include insightface/thirdparty/face3d/mesh/cython/*.c
include insightface/thirdparty/face3d/mesh/cython/*.py*

# Objects
include insightface/data/objects/*.pkl
4 changes: 1 addition & 3 deletions python-package/insightface/app/mask_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def decode_params(params):
p4 = params[232:235]
p4 = np.array(p4, dtype=np.float32).reshape( (-1, 1))
return p0, p1, p2, p3, p4

class MaskAugmentation(ImageOnlyTransform):

def __init__(
Expand Down Expand Up @@ -228,5 +228,3 @@ def get_transform_init_args_names(self):
mask_out = tool.render_mask(image, 'mask_blue', params)# use single thread to test the time cost

cv2.imwrite('output_mask.jpg', mask_out)


4 changes: 2 additions & 2 deletions python-package/insightface/model_zoo/scrfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ def scrfd_2p5gkps(**kwargs):
print(kpss.shape)
for i in range(bboxes.shape[0]):
bbox = bboxes[i]
x1,y1,x2,y2,score = bbox.astype(np.int)
x1,y1,x2,y2,score = bbox.astype(int)
cv2.rectangle(img, (x1,y1) , (x2,y2) , (255,0,0) , 2)
if kpss is not None:
kps = kpss[i]
for kp in kps:
kp = kp.astype(np.int)
kp = kp.astype(int)
cv2.circle(img, tuple(kp) , 1, (0,0,255) , 2)
filename = img_path.split('/')[-1]
print('output:', filename)
Expand Down
Loading