diff --git a/__init__.py b/__init__.py index f2d60ea..c147322 100644 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,6 @@ import glob import json import os -import random import shutil import traceback import uuid diff --git a/img.png b/img.png new file mode 100644 index 0000000..58e8b05 Binary files /dev/null and b/img.png differ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..a55a6ef --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +# Face Occu Detect + +## Code From: https://github.com/LamKser/face-occlusion-classification + +![img.png](img.png) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..77029ba --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +ffmpy +torch +torchvision +Pillow \ No newline at end of file diff --git a/test_single_image.py b/test_single_image.py index 1f9efd5..cb18d47 100644 --- a/test_single_image.py +++ b/test_single_image.py @@ -63,7 +63,7 @@ def test_node(image:torch.Tensor,length=10,thres=95,model_name="convnext_tiny"): } device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model = Model(model_name, 2, False).to(device) - weight = os.path.join(os.path.dirname(os.path.abspath(__file__)),weight_dic[model_name]) + weight = os.path.join(os.path.dirname(os.path.abspath(__file__)), "model", weight_dic[model_name]) model = load_weight(model, weight) model.eval() image = image.permute(0,3,1,2)