
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
2023-08
:仓库创建,更新wd14打标。
按需要的requirements.txt配置即可
pip install -r requirements.txt
(Optional) 为了方便调用,可使用
pip install light-tagger
或者
git clone https://github.com/bubbliiiing/light-tagger.git
cd light-tagger
python setup.py install
快速安装。
然后,我们就可以在别的project里面使用light-tagger。
python predict.py
from light_tagger import TaggerPredictor
# "SmilingWolf/wd-v1-4-convnext-tagger-v2"
# "SmilingWolf/wd-v1-4-convnextv2-tagger-v2.onnx"
# "SmilingWolf/wd-v1-4-swinv2-tagger-v2"
# "SmilingWolf/wd-v1-4-vit-tagger-v2"
model_name = "SmilingWolf/wd-v1-4-convnext-tagger-v2"
model = TaggerPredictor(model_name)
model(raw_image)
当前必要输入为image。
无论是numpy格式还是PIL均可,使用RGB色域。
当前输出均为字典,通过不同的key调用不同的输出。
sentence代表打标结果汇总的一句话;
probs代表相对于总标签集合,每个标签的得分;
tags_list代表打标结果对应的list;
{
"sentence": "general, sensitive, 1girl, long hair, smile, shirt, sitting, outdoors, barefoot, water, plaid, ocean, animal, beach, dog, leash, sand, plaid shirt",
"tags_list": ['general', 'sensitive', '1girl', 'long hair', 'smile', 'shirt', 'sitting', 'outdoors', 'barefoot', 'water', 'plaid', 'ocean', 'animal', 'beach', 'dog', 'leash', 'sand', 'plaid shirt'],
"probs": [3.5740888e-01, 6.6963732e-01, 4.4209361e-03, ... 4.7683716e-06, 7.1525574e-07, 4.7683716e-07],
}
FAQs
A package for tagging photo, all the tags will be combine to a sentence.
We found that light-tagger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.