跳至主要內容
LPrincess

LPrincess

From a mysterious castle...

ACM
IELTS
Who I am
NSSCTF 3rd —— Cainの秘密图片姬

根据题目,猜想应该是跟图像相关对抗网络

查看 train.py,根据经验直到应该是梯度攻击

import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.transforms as transforms
import numpy as np
from PIL import Image
import torch.nn.functional as F

class tanji_model(nn.Module):
    def __init__(self):
        super(tanji_model, self).__init__()
        self.classifier = nn.Sequential(
            nn.Linear(31 * 31, 512),
            nn.ReLU(),
            nn.Linear(512, 128),
            nn.ReLU(),
            nn.Linear(128, 1),
        )

    def forward(self, x):
        x = torch.flatten(x, 1)
        y = self.classifier(x)
        return torch.sigmoid(y)

# 加载与训练模型文件model.pth
tanji = tanji_model().cpu()
tanji.load_state_dict(torch.load('model.pth'))
tanji.eval()
print(tanji)

# 创建一个跟flag一样的空白图片
flag_size = (31, 31)
img = torch.zeros((1, 1, * flag_size), requires_grad = True)
# 设置优化器
optimizer = optim.Adam([img], lr=0.001)

for i in range(10000):
    # 把梯度置零
    optimizer.zero_grad()
    output = tanji(img)
    # 计算损失 _ 最小化负对数似然损失
    loss = -torch.log(F.sigmoid(output))
    # 反向传播
    loss.backward()
    # 更新参数
    optimizer.step()
    with torch.no_grad():
        img.clamp_(0, 1)
    if i % 100 == 0:
        print(f'Iteration {i}, Loss: {loss.item()}')

# 保存图片
optimized_image = transforms.ToPILImage()(img.squeeze(0))
# optimized_image = transforms.ToPILImage()(img[0].cpu()).save('flag.png')
optimized_image.show()
optimized_image.save('flag.png')

LPrincess大约 2 分钟ctfmiscai
Davinci

课题介绍

达芬奇密码桌游是一款流行的逻辑推理类游戏,玩家通过推理和猜测对手的牌面来赢得游戏。随着网络技术的发展,传统的桌面游戏逐渐向网络化、数字化方向转变,网页版的桌游可以突破时间和空间的限制,使玩家能够更加方便地进行游戏。本课题旨在利用Spring MVC框架开发一个网页版的达芬奇密码桌游单机版,提升游戏的可访问性和用户体验。

实现以下功能:

  • 用户管理:用户可以注册、登录个人信息。
  • 游戏逻辑:实现达芬奇密码桌游的核心规则,包括牌的抽取、放置、猜测等。
  • 游戏界面:设计并实现友好的用户界面,使玩家能够直观、便捷地进行游戏操作。

LPrincess大约 3 分钟tomcatservletJava Web
Image processing

基于opencv课程设计,分两个部分,一个是根据要求将图像素材进行基础的函数处理,第二部分开发综合图像处理软件

第一部分 图像基础操作

1.1 返回图中的饮料瓶个数,选出容量少的那一瓶饮料,用绿色填充液体部分

(1)思路

操作一:返回饮料瓶个数

  • 加载灰度图像,并图像二值化处理,将非黑色像素设置成白色,能够很好的排除瓶子液体部分的干扰
  • 使用cv2.filter2D 和一个锐化核对图像进行锐化处理
  • 提取边缘:使用 cv2.Canny 提取图像的边缘
  • 寻找轮廓:使用 cv2.findContours 寻找边缘图像中的轮廓
  • 轮廓数组的长度就是拼字的个数

LPrincess大约 18 分钟image
About me

Hi there 👋

基础信息 Basic Information

📍 地区:福建厦门

🐣 出生:2003.03

🎓 学历:本科大四在读

🏫 院校:厦门大学嘉庚学院

🕮 专业:智能科学与技术

教育背景 Education Background

2023-2024 & 2022-2023 & 2021-2022 First Class Outstanding Student Scholarship

2021-2022 Second Class Scholarship


LPrincess大约 4 分钟vuepress2.0Blog
AI-NLP_Model_Attack-羊城杯2024

Introduction

使用清华大学 OpenAttack 库中的 PWWS(概率加权词显著性攻击方法对类似 BERT 的语言模型执行对抗性攻击。

BERT (Bidirectional Encoder Representations from Transformers): BERT 是由 Google 开发的一种强大的语言模型,它显着提高了各种 NLP 任务的最新技术水平。它使用 Transformer 架构,并在大型文本语料库上进行了预训练,以双向理解句子中单词的上下文。


LPrincess大约 3 分钟ctfmiscai
Syntax

第一阶段句法

7+2+1

不介宾 扩二

名词 n.

冠词 art.

形容词与副词

动词 v.

介词概述

所有格

双重所有格

量词

比较级

最高级

数词 num.

代词

时态和语态(包括被动)


LPrincess小于 1 分钟IELTSSyntax
Accumulation

Synonymous Substitution

同义替换

limb = arm or leg

working on = result in

underlying = base on

not the only (不是唯一) = other than

promptly = immediately 立即地

entirly 完全;彻底;完整地 = exclusively 仅仅;专门;单独

available source of food = prey

reduction = loss

and = along with

were born = breed

suggest = proposal

rehome ... on island = placed on a small island

captive 圈养 = captured

a piece of legislation 立法 = a motion 议,动议

protecting the species = protecting thylacines

attempts to find = expeditions and searches

environmental advantages = ecological benefit

widespread global use = the most consumed…in the world


LPrincess小于 1 分钟IELTSAccumulation
不介宾 扩二

结构: 主 + 不及物动词 + 介词 + 宾语

  • 不及物动词 -> 不完全,与介词一起构成组合动词,组合谓语

  • 介词通常翻译不来

  • 不介宾属于主谓宾句型

例句

(1) Look at

She looks at the boy earnestly.

(2) Listen to

He listens to the waves on the beach.

I listened carefully to his story.

(3) Think about 想起

I often think about my friends.

They think hard about their plans.

(4) Talk about 说起

Farmers talk about the big freeze.

(5) Look for 寻找

We look for an agent in the Middle East.

(6) Look after 照顾

She looks after children in the kindergarden.

(7) Agree with

I agree with her analysis of the situation.

(8) Deal with 处理,解决

Our New York branch deals with the matter.

(9) Worry about

He always worried about his weight.

(10) Laugh at 嘲笑

Everybody laugh at my accent.


LPrincess小于 1 分钟IELTSSyntax
Skills

Lecture 1 Sumarry

tag —— 夹心饼干

考点:空格前后的重要单词(动词或名词)在原文中的同义替换认不认识

细节单词填空题:

keywords:空格前后的名词或动词

找不到完整的夹心,那么就在找到的名词或动词前后一行找对应词性匹配的单词

step 1. 确定整个Summary在原文的出处

step 2. 判断所需空格词性

step 3. 根据空格前后信息在原文中锁定答案

step 4. 填完后通读一遍Summary

注意:

主要考察空格前后的单词(v./n.)对应原文的同义词理解


LPrincess大约 2 分钟IELTSReading
深度学习分类模型解释图的对象相关性消融分析

https://jxmu.xmu.edu.cn/#/digest?ArticleID=4992

[目的]为了提高深度学习的稳定性、可解释性和公平性,针对深度学习基于关联驱动存在偏见的问题,对深度学习卷积神经网络(convolutionalneuralnetwork,CNN)图像分类模型的样本内对象进行相关分析,该分析结果可以为实现稳定学习提供所必须的相关甄别

提出一种深度学习分类模型解释图对象相关性消融分析方法:


LPrincess小于 1 分钟analysisDeep Learning
2
3
4