MCPcopy Create free account
hub / github.com/VisionRush/DeepFakeDefenders / __init__

Method __init__

toolkit/dtransform.py:12–14  ·  view source on GitHub ↗
(self, quality=10, p=0.3)

Source from the content-addressed store, hash-verified

10# 添加jpeg压缩
11class JPEGCompression:
12 def __init__(self, quality=10, p=0.3):
13 self.quality = quality
14 self.p = p
15
16 def __call__(self, img):
17 if np.random.rand() < self.p:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected