시작
@toyxyz3의 트윗을 보고 이런게 가능한지 궁금해서 테스트를 했습니다.
결과물
블렌더에서 Skeletal Graph 제작
기존의 NPR용 리깅에 OpenPose의 Skeletal Graph를 흉내 내서 리그에 추가. 이렇게 하는 것은 ControlNet에서 Pre Process를 안하기 위함인데 어차피 OpenPose를 활용하기 때문에 포즈 추정의 속도는 차이가 없어 보입니다. 의미가 있다면 좀 더 원하는 그리고 화각에 맞는 포즈를 제작한다. 정도일 듯합니다.
OpenPose란
OpenPose는 컨볼루션 신경망과 지도 학습 및 Caffe를 프레임워크로 기반으로 하는 오픈 소스 라이브러리임 사람의 표정, 몸통, 팔다리, 심지어 손가락까지 추적할 수 있어 한 사람뿐만 아니라 다수의 사람을 추적하는데 적합합니다. 이론적 근거는 CMU의 지각 컴퓨팅 연구소의 Zhe Cao가 CVPR 2에 발표한 논문인 Part Affinity Fields를 사용한 Realtime Multi-Person 2017D Pose Estimation에서 비롯합니다.
이미지를 입력하고 백본 (예 : vgg, resnet, mobilenet)을 통과 한 다음 각각 두 개의 분기가있는 6 단계를 거치며 하나는 히트 맵을 감지하고 다른 하나는 vectmap을 감지함. 히트맵과 벡트맵을 사용하면 그림의 모든 핵심 포인트를 알 수 있으며 PAF를 통해 포인트를 각 사람에게 맵핑할 수 있습니다.
기타 배경 소품 제작
배경 모델링은 Sketchfab을 활용.
카메라 셋팅하고 캐릭터를 자리에 위치 시켰습니다.
이번 테스트에서 OpenPose를 위한 Skeletal Graph를 사용했지만 기본 바디 메쉬가 있기떄문에 Depth도 활용 가능 할 것 같습니다.
배경 제작
블렌더에서 Depth 이미지 렌더링
먼저 블렌더 Cycles에서 Depth를 렌더링하고 컴포지팅에서 약간의 조정을 했습니다.
Depth 이미지를 생성하는 러프해서 경계가 불분명할 수 있어서 굳이 블렌더에서 렌더링을 했습니다.
SD WebUI 프롬프트 및 기타 속성 설정
_modelshoot style, (extremely detailed CG unity 8k wallpaper), full shot body photo of the most beautiful artwork in the world, table, chair, cup, drinking_glass, John Constable, Ed Blinkey, Atey Ghailan, Studio Ghibli, by Jeremy Mann, Greg Manchess, Antonio Moro, trending on ArtStation, trending on CGSociety, Intricate, High Detail, dramatic, makoto shinkai kyoto, trending on artstation
Negative prompt: canvas frame, cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), wierd colors, blurry, (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7.5, Seed: 173681984, Size: 512x768, Model hash: 1254103966, Model: protogenV22Anime_22, ControlNet Enabled: True, ControlNet Module: none, ControlNet Model: control_sd15_depth [fef5e48e], ControlNet Weight: 1
뎁스 맵이 밝은 곳은 실사풍을 유지하는 특성이 있습니다.(더 테스트가 필요해 보입니다.)
캐릭터 제작
블렌더에서 Skeletal Graph 렌더링
SD WebUI 프롬프트 및 기타 속성 설정
배경과 큰 차이는 없으나 원하는 그림을 출력하기 위해서 한 두 가지 프롬프트를 빼거나 속성들을 바꿨습니다.
modelshoot style, (extremely detailed CG unity 8k wallpaper), backlight, sunset, full shot body photo of the most beautiful artwork in the world, beautiful, professional majestic impressionism oil painting by Waterhouse, John Constable, Ed Blinkey, Atey Ghailan, Studio Ghibli, by Jeremy Mann, Greg Manchess, Antonio Moro, trending on ArtStation, trending on CGSociety, Intricate, High Detail, dramatic, makoto shinkai kyoto, trending on artstation, trending on CGsociety
Negative prompt: Negative prompt: canvas frame, cartoon, 3d, ((disfigured)), ((bad art)), ((deformed)),((extra limbs)),((close up)),((b&w)), wierd colors, blurry, (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((ugly)), blurry, ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), out of frame, ugly, extra limbs, (bad anatomy), gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), Photoshop, video game, ugly, tiling, poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, mutation, mutated, extra limbs, extra legs, extra arms, disfigured, deformed, cross-eye, body out of frame, blurry, bad art, bad anatomy, 3d render
Steps: 10, Sampler: DDIM, CFG scale: 7, Seed: 4124688800, Size: 512x768, Model hash: 1254103966, Model: protogenV22Anime_22, Denoising strength: 0.7, Hires upscale: 2, Hires upscaler: Latent (nearest)
배경은 ABG Remover로 제거 했습니다.
이미지 편집기로 레이어 작업
이것도 블렌더로 하면 좋겠지만 ARG Remover의 뎁스 생성이 러프해서 Affinity같은 이미지 편집 프로그램에서 빠르게 수정했습니다.
테스트 결과
1.
대부분의 시간은 프롬프트로 그럴듯한 이미지를 생성하는데 보냈습니다.
2.
따로 만들기 때문에 라이팅을 프롬프트로 맞추기가 쉽지 않습니다.
3.
대부분의 기능이 Python이기 때문에 API등을 통해서 블렌더와 연동도 가능할 것 같지만 이미 누군가 작업하고 있을 것 같습니다. 지금은 의미가 있지만 좀 지나면 더 자동화 되거나 새로운 기능이 나올 수 있을 것 같습니다.
리소스
참고한 튜토리얼
해당 튜토리얼에 더 자세히 설명되어 있습니다.
사용한 모델
OpenPose처럼 보이게 하는 블렌더 리그 셋
toyxyz가 제작해서 공유한 블렌더 리그입니다.
HF PoseMaker
굳이 블렌더를 사용하지 않아도 HF에 있는 2D 포즈 에디터인 PoseMaker를 사용도 얼마든지 가능합니다.
OpenPose Editor for WebUI
방금 OpenPose Editor가 WebUI에 추가가 됨.(커뮤니티 베이스다보니 사람들의 관심사에 따라서 기능이 바로 추가됩니다. 그렇기 때문에 만들 필요 없이 사용하는 데에도 시간이 부족한듯 합니다. 그리고 WebUI에 three.js 같은 것으로 Magic Poser같이 3D로 포즈 취하는 기능이 얼마든지 들어갈 수 있습니다.)
ARG Remover HF
WebUI에 플러그인으로 설치해서 바로 사용할 수 있습니다.
ControlNet-Vdieo
영상을 인풋으로 넣어서 ControlNet로 처리하는 HF 데모 입니다.
Novel AI Tag
Tag 제너레이터, NovelAI 및 WD는 학습데이터에 이슈가 있으나 이미 여러가지 모델에 머징이 되어있는 상태입니다. 때문에 인기있는 모델에 대부분 적용이 될 수 있습니다.
응용
Multi Leg
본을 추가로 심으면 여러개의 다리도 생성 가능 합니다.





















