Git Product home page Git Product logo

kwan3854 / ceb_econ Goto Github PK

View Code? Open in Web Editor NEW
73.0 2.0 4.0 61.25 MB

AI based all-in-one character generator Blender plug-in. This project contains unofficial updates for the CEB_ECON Blender add-on.

License: GNU General Public License v3.0

Python 99.79% Batchfile 0.11% Shell 0.05% Nu 0.03% PowerShell 0.01%
3d-graphics 3d-modeling blender-addon character-generator computer-graphics computer-vision game-development model-generator stable-diffusion texture-generation

ceb_econ's Introduction

CEB_ECON Unofficial Update

Demo

This project contains unofficial updates for the CEB_ECON Blender add-on.

  • ECON is is designed for "Human digitization from a color image"
  • TEXTure

Installation Guide

  • Tutorial video has been added

Download

  1. Click on the green <> Code button and select Download ZIP.

    • This will download the CEB_ECON-main.zip file.
  2. Visit the original CEB_ECON page, name your fair price, and click on the 'purchase' button.

    • If this project has been helpful to you, please consider supporting Carlos Barreto and CEB Studios on their Patreon page.
  3. [RECOMMENDED] Download CUDA 11.6 and vs_BuildTools.exe.

    [NOT RECOMMENDED] Instead of installing CUDA 11.6 and VS BuildTools, you can download JIT_Compiler_PY38_CUDAv11.6.7z from this link and install it from Blender.

    • You can skip this step if you have already installed CUDA 11.6 and Visual Studio 2019.
  4. Obtain Hugging Face Tokens

    1. Register for a Hugging Face account and log in.
    2. Navigate to the https://huggingface.co/settings/tokens page.
    3. Create a new token.
      1. Click on the New token button.
      2. Name it (e.g., ECON).
      3. Set the role to 'read'.
      4. Generate the token.
    4. Copy the token, paste it into notepad, and save the token text as a .txt file. Remove the .txt extension and name this file TOKEN.

Installation

  1. vs_BuildTools.exe

    1. Open vs_BuildTools.exe.
    2. Install the C++ build tools.
  2. CUDA 11.6

    • Install CUDA 11.6.
  3. Run Blender as an administrator.

  4. Navigate to the Scripting tab in Blender and copy-paste this code:

    import subprocess
    import sys
    subprocess.check_call([sys.executable, "-m", "pip", "install", "ruamel.yaml"])
  5. Press the Enter key and ensure that it returns 0:

    >>> import subprocess
    >>> import sys
    >>> subprocess.check_call([sys.executable, "-m", "pip", "install", "ruamel.yaml"])
    0
  6. Navigate to Edit -> Preferences -> Add-ons. Click on the Install button and select the CEB_ECON-main.zip file. Then, click on Install Add-on.

  7. Enable the CEB_ECON add-on by clicking on General: CEB ECON. Close the Preferences window.

  8. Navigate to Window -> Toggle System Console and keep this window open for reference.

    • From this point forward, keep an eye on this window for any potential errors as you proceed with the installation process.
  9. Open the ECON Install tab in Blender.

    • Click on the arrow button on the right side.
    • Click on ECON Install to open the installation tab.
  10. Click on Venv and Installs to open the tab.

  11. Click on Path and choose the directory in which to install the virtual environment (venv).

    • For example, C:\ECON_VENV
  12. Click on Create ECON Venv and wait for the process to complete.

  13. Click on Download ECON and wait for the download to complete.

  14. Click on Finish ECON Install and wait for the installation to finish.

  15. Click on Down&Install Pytorch_3D and wait for the process to complete.

  16. Click on Download TEXTure and wait for the download to complete.

  17. Click on the Register button, then go to Login -> Register to register.

  18. Log in.

  19. Click on the Register on all button from the Blender add-on.

  20. Register all projects by clicking on the Register now buttons.

  21. Go back to Blender, type your ID and password, then click Download.

    • This may take some time. Wait until the process is finished. (if you see Out: pymafx_data.zip on the console window, it means the process is finished.)
    • This add-on does not collect your ID and password data.
  22. If desired, you can delete downloaded zip files by checking Erase Zip and clicking on the Download button once more.

  23. Copy the TOKEN file to C:\Users\{USER NAME}\AppData\Roaming\Blender Foundation\Blender\{BLENDER VERSION}\scripts\addons\CEB_ECON-main\ECON\TEXTure\ .

Test Run

Blender requires administrative privileges for the first run.

  1. Navigate to the ECON Generate Models tab on the right side to generate 3D models.

  2. [Optional] You can change the ECON Settings

    and click on Save Configuration.

    • Refer to this page to understand how each option affects the output.
  3. Import a full-body image by clicking on Import Image.

  4. Click on Generate 3D Model to generate a 3D model from the provided image.

    • Per vertex color is included. You can check it by navigating to Material Properties -> New -> Base Color (click circle button) -> Input -> Color Attribute.
  5. Click on Generate Animatable 3D Model to generate a model in A pose with a UV mapped texture file.

  6. To generate a backside texture, write a prompt that describes your image and click on Generate texture.

    • For example, A man wearing a black T-shirt, black jeans, and black shoes.
  7. After the first run, Blender no longer requires administrative privileges.

Release Notes

  • June 1, 2023:

    • Uploaded Tutorial video
  • May 26, 2023:

    • Fix TEXTure install bug
    • Fix IFNet option
  • May 25, 2023:

    • Fix imperfect texturing (TEXTure)
  • May 24, 2023:

    • Updated the TEXTure Feature
    • Updated the Avatarizer Feature
    • UI Improvements
  • May 23, 2023:

    • Updated the "Download ECON" button to fetch the newer version of ECON, moving from the Jan 09 version to the May 14 version.
    • Enabled config (econ.yaml) modifications directly from the add-on. For usage instructions, refer to the tricks.md. Please note there is a current issue with 'use_ifnet' that needs fixing.

Upcoming Updates

For the Plugin

  • Integration with Mixamo.
  • Integration with the TEXTure feature is underway, which will include both the installation and usage aspects. (done)

For ECON

  • Working to resolve the xatlas UV mapping issue that causes black seams. (done)
  • Improvement of the Texture feature. (done)
  • Plans to enable Unity integration are in the pipeline.
  • The 'use_ifnet' bug fix is currently being worked on. (done)
  • Directory bug on windows (temp fix on CEB ECON)

Tested Environment

The plugin has been tested and validated under the following hardware and software configurations:

  • OS: Windows 11 (Please note, only Windows OS is currently supported)
  • CPU: Intel i7 13700K
  • GPU: NVIDIA RTX 4080 with 16GB VRAM
  • RAM: 32GB

performance may vary under different hardware configurations

ceb_econ's People

Contributors

kwan3854 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ceb_econ's Issues

Error at reconstruction stage: ImportError: cannot import name 'url_quote' from 'werkzeug.urls'

Maybe newbie question here, but after completing installation following the steps described (using CUDA 11.6 and vs tools 2019)and trying to generate a model using one of the test images provided, nothing happens. After using Blender's System Console an error message appears:

ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (D:\Installed_Programs\ECON\ECON_38_env\lib\site-packages\werkzeug\urls.py)

I've been looking everywhere but I cannot find what is causing the issue.

Download script not working I think we are getting a 401 response from mpg.de

Just tried following the tutorial and I am getting an issue at the last step downloading I also see that in the script you have your password hardcoded. Maybe I'm missing something.

Edit: I found the problem I had already registered for some of the other models with the smae user name but a different password. Changing my multiple mpg.de accounts to share the same password worked and I was able to download.

More dependencies

when installing it asks for other dependencies
image

but trying to execute it it gives an error
image

AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'

(ECON_38_env) C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON>python -m apps.infer -cfg ./configs/econ.yaml -in_dir ./examples -out_dir ./results Resume Normal Estimator from ./data/ckpt/normal.ckpt Resume IF-Net+ from ./data/ckpt/ifnet.ckpt Complete with IF-Nets+ (Implicit) SMPL-X estimate with PIXIE Dataset Size: 1 0%| | 0/1 [00:00<?, ?it/s]INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Body Fitting -- normal: 0.015 | silhouette: 0.042 | joint: 0.056 | Total: 0.113| loose:0, occluded:0: 98%|▉| 49/50 [0 examples\PXL_20201106_052006014: 0%| | 0/1 [00:39<?, ?it/s] Traceback (most recent call last): File "runpy.py", line 194, in _run_module_as_main File "runpy.py", line 87, in _run_code File "C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\apps\infer.py", line 343, in <module> get_optim_grid_image(per_loop_lst, None, nrow=N_body * 2, type="smpl") File "C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\lib\dataset\mesh_util.py", line 668, in get_optim_grid_image grid_img = grid_img.resize((grid_img.size[0], grid_img.size[1]), Image.ANTIALIAS) AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS' Cannot read from OBJ file:'C:\Users\Kendrick\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON-main\ECON\results\econ\obj\PXL_20201106_052006014_0_full.obj'. OBJ import of 'PXL_20201106_052006014_0_full.obj' took 0.2 ms

Looks like pillow changed at version 1.0.0 so we can either downgrade pillow or update the "CEB_ECON-main\ECON\lib\dataset\mesh_util.py" to use the new syntax.

pip install Pillow==9.5.0

or

line 668 in "CEB_ECON-main\ECON\lib\dataset\mesh_util.py"

grid_img = grid_img.resize((grid_img.size[0], grid_img.size[1]), Image.LANCZOS)

I just tested this second method and can confirm that it works.

Crash on Install ECON on venv

Hi, I've tried several times to go through install process in Blender but every times it blocks at the end of this steps:
Collecting torch==1.12.1+cu116 (from -r requirements. txt (line 24))

Is it related to installation of Python on my system?

I'm using Blender v.3.5.1

No such file "smplx_faces.npy" and IndexError: list index out of range when Execute

Thank you for your great work, when I did following CEB Econ Tutorial, when "Exucute" , the error message is as follows, how to solve it ?
File "F:\Econ-texture\ECON_39_env\lib\site-packages\numpy\lib\npyio.py", line 405, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON\ECON\lib\dataset\../../data/smpl_related\smpl_data/smplx_faces.npy'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON\econ_blender.py", line 560, in execute
bpy.ops.wm.obj_import(filepath=final_obj[-1]) #import o ultimo
IndexError: list index out of range
Error: Python: Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\CEB_ECON\econ_blender.py", line 560, in execute
bpy.ops.wm.obj_import(filepath=final_obj[-1]) #import o ultimo
IndexError: list index out of range

Hugging face tokens

Hey, I was wondering what the hugging face tokens were required for? Would it be possible to create the model without them?
Is it only for texturing etc?

The reason I ask is because I noticed that CUDA is a requirement so I assumed ECON shipped with this to run locally but I may be wrong about that?

Install compiler

Hello, I came a cross this option "Install compiler"
it would be the sme file that I made available as Zip for people to use?

if it is, I think you need to tell about where people could get it, I didnt find information on the github.

Or, there is a better option.
I found tht the best is to inform the user to install visual studio build tools and CUDA sdk.
Installing both is more reliable and it will be usefull for more addons and software the user might want to install. while this compiling strategy that I used at that time was not scalable and had a lot of "trash" in it.

But, back on the question, this install compiler would be the same one that is available on the original code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.