AI_최종 통합 설계 및 회고 - 100-hours-a-week/16-Hot6-wiki GitHub Wiki
- Base Model: VGG16(weight = imageNet)
- Base Model을 기반으로 True, False 이진 분류로 설계
- 성능: A100 - 약 42ms, CPU - 약 175ms
- CPU 성능으로도 분류하는데, 큰 무리가 없으므로 추후에 Backend에 올려서 사용할 가능성 있음
- Base Model : Blip-image-captioning-base Link
- 이미지에서 캡션을 꺼내서 프롬프트를 만들어주는 방식
- VRAM -> 1.2GB 사용
- Base Model: Fluently-XL-v2
- SDXL 파인튜닝 모델로 이미지 생성 테스트시 조금 더 나은 성능을 보여주어 해당 모델로 설정 Link참조
- 데스크 셋업 이미지 366장으로 학습한 서비스 특화 LoRA 사용 (Kohya_ss_LoRA_trainer_XL로 학습 Link참조)
- 성능: T4 - 약 26s, L4 - 약 12s, A100 약 4s
- 사용 VRAM: 8.7GB ~ 11GB
- Prompt: "A clean, modern desk setup in a white-toned minimalist room with an ultrawide monitor and a neat mechanical keyboard, photorealistic, ultra high resolution."
- Negative Prompt: "blurry, low quality, noisy, distorted, deformed, bad proportions, text, watermark, messy, cluttered background, cartoon, anime, painting, sketch"
dalle_only | ott_only | 3d_only | dalle_ott | dalle_3d | ott_3d | mix | |
---|---|---|---|---|---|---|---|
image | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
VRAM | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB |
- Prompt: "A clean modern desk setup with a dark wooden desk, a large monitor, a white mini PC, potted plants, a wireless ergonomic mouse, a mechanical keyboard with colorful keycaps on a felt mat, natural daylight, cozy and minimalistic."
- Negative Prompt: "blurry, low quality, noisy, distorted, deformed, bad proportions, text, watermark, messy, cluttered background, cartoon, anime, painting, sketch"
dalle_only | ott_only | 3d_only | dalle_ott | dalle_3d | ott_3d | mix | |
---|---|---|---|---|---|---|---|
image | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
VRAM | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB | 약 8.72GB |
- text = "On the Desk" -> on the desk is a laptop and a monitor
- output = a desk with a laptop and a monitor
- prompts = [
"This is a photo of",
"Q: What objects are on the desk? A:",
"desk_setup:" ] - [This is a photo of] → this is a photo of a desk full of computers
[Q: What objects are on the desk? A:] → q : what objects are on the desk? a : laptop, a keyboard, and a monitor
[desk_setup:] → desk _ setup : _ with a laptop, monitor, keyboard, mouse, and mouse - 중요도가 높은 키워드일수록 여러번 나옴
- dalle_only: Dalle(1.0)
- ott_only: ott(1.0)
- 3d_only: 3d(1.0)
- dalle_ott: dalle(0.7), ott(0.5)
- dalle_3d: dalle(0.7), 3d(0.5)
- ott_3d: ott(0.7), 3d(0.5)
- mix: dalle(0.6), ott(0.4), 3d(0.4)
- 처음 원하는 퀄리티가 ChatGPT 4o → Dall-e3 였어서 설계단계와 모델 테스트 중에 원하는 퀄리티가 나오지 않아 걱정
- 퀄리티는 그 정도 수준으로 아주 준수하지는 않지만 LoRA를 이용해 Fine tuning하고 Pretrained 모델을 적절히 이용하면서 최대한 퀄리티를 끌어올림
- 현재 유행하고 있는 이미지 생성 모델의 전반적인 구조 학습 및 LoRA 원리, 모델 양자화 원리 등을 학습
- 타 프로젝트와 달리 Local 수준에서 모델이 돌아가는 것이 아닌 서버 수준에서 돌아가기 때문에 파이프라인에 대한 학습
- Dall-e3 수준의 퀄리티를 낼 수 있도록 지속적으로 모델 Fine tuning
- 생성된 이미지에 추천한 상품의 좌표
- 요일별 혹은 추천 컨셉에 맞는 이미지 생성
- 서비스 특화 LoRA인 OTT LoRA와 3D Office LoRA를 사용하는 것이 해당 서비스에 알맞은 것으로 판단된다. 해당 LoRA를 기반으로 좀 더 Fine tuning하거나 가중치를 바꿔가며 적절히 섞어 사용하는 것이 합리적으로 보인다.
- Img2txt 관련 기법이 여러가지가 있는데, 추후에 벡터 DB 사용 여부에 대해서 생각해볼 필요가 있을 것으로 예상된다.