PERF 补齐文档

This commit is contained in:
康宇佳 2025-02-17 15:20:50 +08:00
parent 8a8ffb4540
commit 259313edc5
5 changed files with 10 additions and 2 deletions

View File

@ -1,7 +1,6 @@
import glob
import json
import os
import random
import shutil
import traceback
import uuid

BIN
img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

5
readme.md Normal file
View File

@ -0,0 +1,5 @@
# Face Occu Detect
## Code From: https://github.com/LamKser/face-occlusion-classification
![img.png](img.png)

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
ffmpy
torch
torchvision
Pillow

View File

@ -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)