The English explanation is below. 日本語 前回のプロジェクトと同じ仕組みです https://scratch.mit.edu/projects/1204865029/ AIでアジア人女性の顔画像を生成するプログラムです。64×64の画像を生成します。 【実行方法】 以下のURLから実行してください。 https://turbowarp.org/?project_url=https://raw.githubusercontent.com/1A291109A6/WomanGenerator_Scratch/main/WomanGenerator.sb3 【使い方】 上部のタブをクリックしてモードを切り替えます。 <「Image」モード> 「Generate」ボタン: ランダムなSeed値で生成します。 「Seed」ボタン: 10桁のSeed値を指定して生成します。Seed値を共有して生成した画像を共有できます!(-1を入力するとランダムになります) 「A」「B」「C」「D」ボタン: 気に入った画像ができたら、「A」や「B」のボタンで一時的にキープしておけます。最大4人までキープ可能です。 「保存」ボタン: 特に気に入った画像は、後述の「Gallery」に保存しましょう。 <「Mix」モード> 「Mix A&B」ボタン: このボタンを押すと、Aの画像とBの画像の特徴を混ぜた新しい画像を生成します。髪や目の色が混ざったりします。 <「Gallery」モード> 保存した画像を表示します。 画像をクリックすると大きく表示できます。 削除ボタン(ゴミ箱マーク)をクリックして全削除、または選んだ画像のみ削除できます。 ここからお気に入りの画像を「A」「B」「C」「D」に呼び出して、再び「Mix」や「Video」作成に使うこともできます。 <「Video」モード> A、B、C、Dにキープした4人の画像が、滑らかに次々と変化していく不思議なループ動画を作成できます。 「Generate Video」ボタン: Aの顔がBの顔へ、BがCへ、CがDへ、そしてDがまたAへとループして変化する動画を作成します。動画のフレーム数を設定してください。 <「Changing」モード> 4人の画像(A, B, C, D)が変化していく画像を生成します。 「Generate Changing Images」ボタン: 生成される画像は、左上にA、右上にB、右下にC、左下にDの画像が配置されます。そして、その間を埋めるように、画像が混ざり合いながら変化していく途中の画像を生成します。 English This project works the same way as the previous one: https://scratch.mit.edu/projects/1204865029/ It is a program that generates AI-based face images of Asian women. The generated images are 64×64 in size. 【How to Run】 Please run it from the following URL: https://turbowarp.org/?project_url=https://raw.githubusercontent.com/1A291109A6/WomanGenerator_Scratch/main/WomanGenerator.sb3 【How to Use】 Click the tabs at the top to switch modes. <“Image” Mode> Generate button: Generates an image with a random seed value. Seed button: Generates an image with a specified 10-digit seed value. You can share seed values to share generated images! (Enter -1 for random.) “A”, “B”, “C”, “D” buttons: If you like an image, you can temporarily keep it by assigning it to A, B, C, or D. Up to 4 images can be kept. Save button: If you especially like an image, save it to the “Gallery” (explained below). <“Mix” Mode> Mix A&B button: Generates a new image that blends the features of images A and B. For example, hair or eye colors may be mixed. <“Gallery” Mode> Displays saved images. Click an image to view it larger. Click the delete button (trash icon) to delete all or only selected images. From here, you can load your favorite images back into A, B, C, or D to use them again for “Mix” or “Video” creation. <“Video” Mode> Creates a smooth looping video where the four images saved in A, B, C, and D gradually transform into one another. Generate Video button: Creates a video where face A transforms into B, B into C, C into D, and D back into A in a loop. Please set the number of frames for the video. <“Changing” Mode> Generates transition images among the four kept images (A, B, C, D). Generate Changing Images button: The generated output places A at the top-left, B at the top-right, C at the bottom-right, and D at the bottom-left. Between them, intermediate images are created that gradually blend the features of each.
VAEのみを使って学習しています。 他の顔画像データセットでも学習してみましたが、サングラスなどの顔以外の要素が多くて綺麗に生成ができませんでした。このデータセットでは選別された画像のみ使っているので比較的綺麗に生成ができました。 【使用上の注意】 生成した画像は営利目的の利用は禁止です。また、使用時には適切なクレジットを表示してください。 【ATTENTION】 The generated images may not be used for commercial purposes. Please display appropriate credit when using them. 【AIの学習に使用したデータセット】 https://www.kaggle.com/datasets/yewtsing/pretty-face 【License】 CC BY-NC-SA 4.0 【AIのパラメータ数】 3.8M 【AIの構成】 VAEのデコーダ部分を使用 latent_dim = 128 # 潜在ベクトルの次元 # 128→512×4×4 nn.Linear(latent_dim, 512 * 4 * 4) # 512×4×4→256×8×8 nn.ConvTranspose2d(512, 256, 4, 2, 1) nn.BatchNorm2d(256) nn.ReLU(True) # 256×8×8→128×16×16 nn.ConvTranspose2d(256, 128, 4, 2, 1) nn.BatchNorm2d(128) nn.ReLU(True) # 128×16×16→64×32×32 nn.ConvTranspose2d(128, 64, 4, 2, 1) nn.BatchNorm2d(64) nn.ReLU(True) # 64×32×32→3×64×64 nn.ConvTranspose2d(64, 3, 4, 2, 1) nn.Sigmoid() 【Tags】 #WomanGenerator #FaceGenerator #Morphing #AIart #AI #VAE #ImageGenerator #Generator #GenerativeAI