Steganografiya quyidagi sohalarda qo'llaniladi, lekin ular bilan cheklanmaydi


watermarked_dataset.append((x, y))



Download 45,83 Kb.
bet16/40
Sana14.04.2022
Hajmi45,83 Kb.
#551350
1   ...   12   13   14   15   16   17   18   19   ...   40
Bog'liq
sregono

watermarked_dataset.append((x, y))

trainloader, valloader, testloader = self.loaders(watermarked_dataset)
triggerloader = torch.utils.data.DataLoader(
self.specialset, batch_size=self.args.trigger_size, shuffle=True)

return trainloader, valloader, testloader, triggerloader

def __write_letter(self, letter, data, offset):
"""Write text on input data through pyfliglet library.

Returns:
data (Object): data with inserted msg
"""
result = pyfiglet.figlet_format(letter, font="3x5")
result = result.replace('#', '1')
result = result.replace(' ', '0')
height = result.count('\n')
result = result.replace('\n', '0')
width = 4
x, y = offset

for i in range(height):
for j in range(width):
if int(result[i * (height - 1) + j]) == 1:
data[i + x][j + y] = 1

return data

def generate_trigger_patch_msg(self):
"""Generation trigger set with msg written
on the legitimate input

Returns:
trainloader (Object): training loader
valloader (Object): validation loader
testloader (Object): test loader
triggerloader (Object): trigger loader
"""
watermarked_dataset = []
for x, y in self.trainset:
watermarked_dataset.append((x, y))
# Sample the legitimate data to backdoor
sampled_triggerset = random.choices(watermarked_dataset, k=20)
triggerset = []
# Load parameters
msg = self.patch_args['msg']
target = self.patch_args['target']
for item_x, _ in sampled_triggerset:
k = 0
batch, size_x, size_y = item_x.shape

Download 45,83 Kb.

Do'stlaringiz bilan baham:
1   ...   12   13   14   15   16   17   18   19   ...   40




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish