๐Ÿ‘จ‍๐Ÿซ

Adversarial Robustness Toolbox(ART) ์„ค์น˜

geum 2021. 12. 28. 16:24

 

์†Œ๊ฐœ

ART๋Š” IBM ์‚ฌ์—์„œ ๊ฐœ๋ฐœํ•œ ๋จธ์‹ ๋Ÿฌ๋‹ ๋ณด์•ˆ์šฉ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋‹ค. ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์— 'IBM moved ART to LF AI in July 2020.' ๋ผ๊ณ  ๋˜์–ด์žˆ๋Š” ๊ฒƒ์„ ๋ณด๋ฉด ํ˜„์žฌ๋Š” LF AI๋ผ๋Š” ๊ณณ์—์„œ ๊ด€๋ฆฌ๋ฅผ ํ•˜๋Š” ๊ฒƒ ๊ฐ™๋‹ค.

 

๊ด€๋ จ ์‚ฌ์ดํŠธ

๊ณต์‹ ์‚ฌ์ดํŠธ : https://adversarial-robustness-toolbox.org/

๊ณต์‹ docs : https://adversarial-robustness-toolbox.readthedocs.io/en/latest/

๊ณต์‹ github : https://github.com/Trusted-AI/adversarial-robustness-toolbox

 

์„ค์น˜

๊ณต์‹ ๊นƒํ—ˆ๋ธŒ๋ฅผ ์ฐธ๊ณ ํ•˜์—ฌ ์„ค์น˜๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด ๋˜๊ณ  pip๋ฅผ ์ด์šฉํ•œ ๋ฐฉ๋ฒ•๊ณผ git clone์„ ์ด์šฉํ•œ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค.

(โ€ป ํŒŒ์ด์ฌ 3.x ๊ธฐ์ค€์œผ๋กœ ์‹คํ–‰๋˜๋„๋ก ๋งŒ๋“ค์–ด์กŒ์Œ)

 

1) pip ์„ค์น˜

๊นƒํ—ˆ๋ธŒ์˜ Get Started ๋ฌธ์„œ๋ฅผ ๋ณด๋ฉด 'ART and its core dependencies can be installed from the PyPI repository using pip:' ๋ผ๊ณ  ๋˜์–ด ์žˆ๋Š”๋ฐ PyPI๊ฐ€ ํ•„์š”ํ•˜๋‹ค๋Š” ๊ฑด์ง€, ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ clone ๋ฐ›์•„์„œ ์„ค์น˜ํ•ด์•ผํ•˜๋Š” ๊ฑฐ๋ฉด ์–ด๋–ค PyPI ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ ๋ฐ›์•„์•ผํ•˜๋Š” ๊ฑด์ง€ ์ € ๋ฌธ์žฅ์˜ ์˜๋ฏธ๋ฅผ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋‹ค. ๋ช…๋ น์–ด๋Š” ์•„๋ž˜์ฒ˜๋Ÿผ ์“ฐ๋ฉด ๋œ๋‹ค๊ณ  ํ•œ๋‹ค.

 

pip install adversarial-robustness-toolbox

 

2) git clone → ๋‚ด๊ฐ€ ์‚ฌ์šฉํ•œ ๋ฐฉ๋ฒ•

Manual Installation์ด๋ผ๊ณ  ๋˜์–ด ์žˆ๊ธด ํ•˜์ง€๋งŒ pip ์„ค์น˜ ๋ฐฉ๋ฒ•์„ ์™„๋ฒฝํ•˜๊ฒŒ ์ดํ•ดํ•˜์ง€ ๋ชปํ•œ ๋‚˜ํ•œํ…Œ๋Š” ์ด ๋ฐฉ๋ฒ•์ด ๋” ํŽธํ–ˆ๋‹ค.

 

# 1. git clone
git clone https://github.com/Trusted-AI/adversarial-robustness-toolbox

# 2. adversarial-robustness-toolbox ํด๋”๋กœ ์ด๋™ ํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด ์ž…๋ ฅ
pip install .

 

์ฐธ๊ณ 

1) ART Unit tests

ART environment ๋‚ด์—์„œ bash run_tests.sh ๋ช…๋ น์–ด๋กœ unit test๋ฅผ ํ•  ์ˆ˜ ์žˆ๋‹ค๊ณ  ํ•œ๋‹ค. ์ฒ˜์Œ ์‹คํ–‰ํ•˜๋ฉด ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ์…‹์„ ๋‹ค ๋ฐ›์•„์˜ค๊ธฐ ๋•Œ๋ฌธ์— ์‹œ๊ฐ„์ด ์ข€ ๊ฑธ๋ฆด ๊ฒƒ์ด๋ผ๊ณ  ์ ํ˜€ ์žˆ๋‹ค.

 

2) Getting Started With ART

ART๋ฅผ ์‚ฌ์šฉํ•œ ์˜ˆ์ œ๋Š” examples ํด๋” ์•ˆ์— ์—ฌ๋Ÿฌ ์ข…๋ฅ˜๊ฐ€ ๋“ค์–ด ์žˆ๋Š”๋ฐ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์›ํ•˜๋Š” ํŒŒ์ผ์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

python examples/<example_name>.py