PERF 补齐文档
This commit is contained in:
parent
8a8ffb4540
commit
259313edc5
|
|
@ -1,7 +1,6 @@
|
||||||
import glob
|
import glob
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import random
|
|
||||||
import shutil
|
import shutil
|
||||||
import traceback
|
import traceback
|
||||||
import uuid
|
import uuid
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Face Occu Detect
|
||||||
|
|
||||||
|
## Code From: https://github.com/LamKser/face-occlusion-classification
|
||||||
|
|
||||||
|

|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
ffmpy
|
||||||
|
torch
|
||||||
|
torchvision
|
||||||
|
Pillow
|
||||||
|
|
@ -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')
|
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
||||||
model = Model(model_name, 2, False).to(device)
|
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 = load_weight(model, weight)
|
||||||
model.eval()
|
model.eval()
|
||||||
image = image.permute(0,3,1,2)
|
image = image.permute(0,3,1,2)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue