This repository provides a user-friendly implementation of the SPDE-Induced Evaluation Metric (SIEM). The code here is a simplified 'toy example' designed for easy access and quick testing, allowing anyone to get a feel for how SIEM works.
For the comprehensive and rigorous experiments presented in our research paper, please refer to the official repository, which will be linked here upon publication.
이 리포지토리는 SPDE-Induced Evaluation Metric (SIEM)의 사용자 친화적인 구현체를 제공합니다. 여기에 포함된 코드는 누구나 쉽게 접근하고 빠르게 테스트해볼 수 있도록 설계된 간단한 'toy example'입니다.
저희 연구 논문에서 다룬 포괄적이고 엄밀한 실험들은 출판 시 링크될 공식 리포지토리를 참고해 주시기 바랍니다.
Requirement (요구 사항)
Python ≥ 3.10
GPU ≥ RTX 4090
OS ≥ Ubuntu 22.04
How to Use (사용 방법)
Follow these steps to set up the environment and run the code.
아래 단계에 따라 환경을 설정하고 코드를 실행하세요.
1. Environment Setup (환경 설정)
bash
1# Update and upgrade system packages2# 시스템 패키지 업데이트 및 업그레이드3apt-get update
4apt-get upgrade
56# Install the diffusers library with training dependencies7# 학습 의존성을 포함하여 diffusers 라이브러리 설치8pip install diffusers[training]910# Install Git LFS to handle large files11# 대용량 파일을 다루기 위해 Git LFS 설치12apt -qq install git-lfs
1314# Upgrade the Pillow library for image processing15# 이미지 처리를 위해 Pillow 라이브러리 업그레이드16pip install --upgrade PILLOW
2. Clone Repository and Download Models (리포지토리 복제 및 모델 다운로드)
bash
1# Clone this repository2# 이 리포지토리를 복제합니다3git clone https://huggingface.co/JunsuSeo/SPDE_Induced_Evaluation_Metric_Code
45# Navigate into the repository directory6# 리포지토리 디렉토리로 이동합니다7cd SPDE_Induced_Evaluation_Metric_Code
89# Install Git LFS hooks and pull the large model files10# Git LFS를 설정하고 대용량 모델 파일을 다운로드합니다11git lfs install12git lfs pull
3. Run the Evaluation (평가 실행)
bash
1# Run the script. The number '1' selects the model to use.2# 스크립트를 실행합니다. 숫자 '1'은 사용할 모델을 선택합니다.3python3 SIEM.py 1
Changing Models (모델 변경하기)
To use other models, change the number at the end of the command. The number can be an integer from 1 to 11.
다른 모델을 사용하려면 명령어의 마지막 숫자를 변경하세요. 1부터 11까지의 정수를 사용할 수 있습니다.
For example, to use model number 5:
예를 들어, 5번 모델을 사용하려면:
python3 SIEM.py 5
Key Results from the Paper (논문 주요 결과)
Here are some of the key results from our research paper, demonstrating the effectiveness of SIEM.
아래는 저희 연구 논문의 주요 결과 중 일부로, SIEM의 효과를 보여줍니다.
Result Figure 1
Evolution of SIEM (Trend: light green; Residuals: orange), FID
(blue), and 2-Wasserstein distance (light purple) during U-Net training on
CIFAR-10. Generated samples at various training steps are shown at the bottom.
CIFAR-10 데이터셋으로 U-Net을 훈련하는 동안의 SIEM(추세: 연두색, 잔차: 주황색), FID(파란색), 2-바서슈타인(2-Wasserstein) 거리(연보라색)의 변화 추이. 하단은 다양한 학습 단계에서 생성된 샘플입니다.
Result Figure 2
The left side of the image displays generated images from various U-Net architectures (UNet-2B, UNet-3B, and UNet-4B), with rows corresponding to different model configurations (e.g., -32K-16G). On the right, two Spearman correlation matrices compare four evaluation metrics: FID, 2-Wasser, Trend, and Residuals. The top matrix shows correlations over the full diffusion range (Timesteps 0-999), while the bottom one focuses on the final steps (Timesteps 901-999). The data reveals a significant positive correlation between the "Residuals" metric and both the "2-Wasser" distance (0.75 and 0.68) and the Fréchet Inception Distance (FID) (0.70 and 0.52) in both scenarios.
이미지의 왼쪽에는 다양한 U-Net 아키텍처(UNet-2B, UNet-3B, UNet-4B)로부터 생성된 이미지들이 있으며, 각 행은 서로 다른 모델 구성(예: -32K-16G)을 나타냅니다. 오른쪽에는 FID, 2-Wasser, Trend, Residuals라는 네 가지 평가 지표를 비교하는 두 개의 스피어만 상관관계 행렬이 있습니다. 위쪽 행렬은 전체 확산 범위(타임스텝 0-999)에 대한 상관관계를 보여주고, 아래쪽 행렬은 마지막 단계(타임스텝 901-999)에 초점을 맞춥니다. 이 데이터는 두 시나리오 모두에서 "Residuals" 지표가 "2-Wasser" 거리(0.75 및 0.68)와 프레셰 인셉션 거리(FID)(0.70 및 0.52) 모두와 유의미한 양의 상관관계가 있음을 보여줍니다.