MCPcopy
hub / github.com/alibaba/EasyCV / __init__

Method __init__

easycv/thirdparty/mtcnn/detector.py:21–36  ·  view source on GitHub ↗
(self, device=None, dir_path=None)

Source from the content-addressed store, hash-verified

19
20class FaceDetector:
21 def __init__(self, device=None, dir_path=None):
22 if device is None:
23 device=try_gpu()
24 self.device = device
25
26 if dir_path is not None:
27 self.pnet = PNet(dir_path).to(device)
28 self.rnet = RNet(dir_path).to(device)
29 self.onet = ONet(dir_path).to(device)
30 self.onet.eval()
31 else:
32 # LOAD MODELS
33 self.pnet = PNet().to(device)
34 self.rnet = RNet().to(device)
35 self.onet = ONet().to(device)
36 self.onet.eval()
37
38 def detect(
39 self,

Callers

nothing calls this directly

Calls 5

try_gpuFunction · 0.85
PNetClass · 0.85
RNetClass · 0.85
ONetClass · 0.85
toMethod · 0.45

Tested by

no test coverage detected