CRM
CRM (Convolutional Reconstruction Model) is Tsinghua University's image-to-3D model. Two multi-view diffusion models generate six views of the object and their coordinate maps, a convolutional UNet turns them into a triplane, and FlexiCubes extracts a coloured mesh. LibreYOLO runs it in plain PyTorch through the LibreGen factory.
- Tác vụ
- 3d generation
- Cài đặt
pip install "libreyolo[gen]"- Bậc hỗ trợ
- Bậc song hành, từ v1.8.0. Một bề mặt sản phẩm riêng với factory và contract riêng.
- Giấy phép
- Mã nguồn MIT and Apache-2.0, trọng số CreativeML OpenRAIL++-M. Sử dụng thương mại
Install
pip install "libreyolo[gen]"texture=True also needs the MIT-licensed xatlas package
(pip install xatlas) for the UV unwrap.
Predict
Nothing is gated and no login is needed. Weights download on first use from LibreYOLO/LibreCRM at a pinned revision.
from libreyolo import LibreGen, SAMPLE_IMAGE model = LibreGen("crm") # weights download on first useresult = model(SAMPLE_IMAGE, seed=0) result.save("object.obj") # vertex colours as `v x y z r g b`m = result.meshesprint(m.vertices[0].shape, m.extras["vertex_colors"][0].shape)# Saves the object as .obj under runs/generate/predict.libreyolo generate source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/guggenheim-bilbao.jpg model=crm seed=0libreyolo generate source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/guggenheim-bilbao.jpg model=crm texture=true# pip install xatlas (MIT, for the UV unwrap)from libreyolo import LibreGen, SAMPLE_IMAGE model = LibreGen("crm")model(SAMPLE_IMAGE, texture=True).save("object.obj")# writes object.obj, object.mtl and object_texture.pngTwo multi-view diffusion models generate six orthographic views of the object and then their canonical coordinate maps; a convolutional UNet turns them into a triplane, and FlexiCubes extracts a mesh coloured by the triplane. Upstream needs xformers, nvdiffrast (NVIDIA, non-commercial) and a GPL mesh library; LibreYOLO runs the same weights in plain PyTorch on NVIDIA GPUs, Apple silicon and CPU, in fp16 on the GPUs as upstream.
The input is padded to a square on grey, without a crop, so a photo works best with the object filling the frame. A seed gives the same starting noise on every device; on CUDA a repeat call gives the same views and triangles, with vertices that can move by about 1e-7. The library measured about 12 s and 12 GB per object on an RTX 3090.
result.meshes holds vertices (V, 3), z-up in [-0.5, 0.5]^3, faces
(F, 3) and extras["vertex_colors"] (V, 3) RGB in [0, 1].
texture=True bakes a 1024 x 1024 UV texture, as upstream does.
Settings
| Setting | Default | Meaning |
|---|---|---|
steps | 50 | Sampling steps of both diffusion stages, 1 to 499. |
guidance | 5.0 | Classifier-free guidance of both stages. |
texture | False | Bake a UV texture (.mtl and .png beside the .obj). |
Variants
One checkpoint, 4.1B parameters: two 2.0B multi-view diffusion models (UNet, OpenCLIP ViT-H/14 and SD VAE each) and a 0.12B reconstruction UNet. About 12.8 GB, plus 0.4 GB for BiRefNet.
Export
| Tác vụ | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | Axelera | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3D generation | 3D generation to ONNX: không được hỗ trợ | 3D generation to TorchScript: không được hỗ trợ | 3D generation to ExecuTorch: không được hỗ trợ | 3D generation to TensorRT: không được hỗ trợ | 3D generation to OpenVINO: không được hỗ trợ | 3D generation to Paddle: không được hỗ trợ | 3D generation to MNN: không được hỗ trợ | 3D generation to RKNN: không được hỗ trợ | 3D generation to Axelera: không được hỗ trợ | 3D generation to ncnn: không được hỗ trợ | 3D generation to TFLite: không được hỗ trợ | 3D generation to CoreML: không được hỗ trợ | 3D generation to Core AI: không được hỗ trợ |
Export is not implemented for LibreGen 3D families. export(), train() and
val() raise NotImplementedError (ADR 0031 in the library).
Licensing
Hãy kiểm tra giấy phép trong repo Hugging Face của trọng số cụ thể mà bạn tải xuống. Mỗi checkpoint trong tổ chức LibreYOLO đều có giấy phép riêng và giấy phép có thể khác nhau trong cùng một họ. Repo đó là nguồn có thẩm quyền; phần tóm tắt dưới đây mô tả các điều khoản áp dụng khi trang này được kiểm chứng lần gần nhất.
Đây là phần mô tả các giấy phép liên quan, không phải tư vấn pháp lý. Nếu câu trả lời có ý nghĩa về mặt thương mại, hãy tự đọc các giấy phép và tham khảo cố vấn của riêng bạn.
- Công trình gốc
- CRM, Tsinghua University (TSAIL)
- Giấy phép thượng nguồn
- CreativeML OpenRAIL++-M
- Nguồn thượng nguồn
- github.com/thu-ml/CRM
- Mã nguồn LibreYOLO
- MIT
- Trọng số
- CreativeML OpenRAIL++-M, được phát hành lại tại huggingface.co/LibreYOLO
- Diễn giải
- The CRM code is MIT and its model card declares MIT for the weights, but CRM's two diffusion models are fine-tuned from ImageDream and MVDream, themselves from Stable Diffusion 2.1, so LibreYOLO treats the weights as under the CreativeML OpenRAIL++-M License of that lineage. OpenRAIL++-M allows commercial use, but its use-based restrictions (no illegal, harmful, discriminatory or deceptive uses, among others) bind you and must be passed on to anyone you share the model or derivatives with. LibreYOLO's adapter is MIT; the code it adapts from CRM is MIT, the FlexiCubes meshing comes from NVIDIA's Apache-2.0 release, and ImageDream parts are Apache-2.0, noted in libreyolo/models/gen/crm/NOTICE. CRM's own FlexiCubes copies with NVIDIA's all-rights-reserved header, nvdiffrast (non-commercial) and the GPL-3.0 mesh tools upstream calls are not used. The Zhengyi/CRM weights are redistributed unchanged as LibreYOLO/LibreCRM, whose card carries the OpenRAIL++-M terms; Background removal runs on LibreYOLO's BiRefNet port with the ZhengPeng7/BiRefNet weights (MIT), from LibreYOLO/LibreTRELLISl. Both are pinned and not gated.
CRM is by Tsinghua University (TSAIL) (thu-ml/CRM). The code is MIT and the model card declares MIT for the weights.
The weights carry use restrictions. CRM's two diffusion models descend from ImageDream, MVDream and Stable Diffusion 2.1, so LibreYOLO treats them as under the CreativeML OpenRAIL++-M License of that lineage. Commercial use is allowed, but its use-based restrictions (no illegal, harmful, discriminatory or deceptive uses, among others) bind you and must be passed on to anyone you share the model or derivatives with.
The Zhengyi/CRM weights are redistributed unchanged as LibreYOLO/LibreCRM,
whose card carries the OpenRAIL++-M terms. FlexiCubes comes from NVIDIA's
Apache-2.0 release; nvdiffrast and the GPL-3.0 mesh tools upstream calls are
not used.
Citation
@article{wang2024crm,
title={CRM: Single Image to 3D Textured Mesh with Convolutional Reconstruction Model},
author={Zhengyi Wang and Yikai Wang and Yifei Chen and Chendong Xiang and Shuo Chen and Dajiang Yu and Chongxuan Li and Hang Su and Jun Zhu},
journal={arXiv preprint arXiv:2403.05034},
year={2024}
}Được sao chép từ khối trích dẫn của tác giả tại github.com/thu-ml/CRM#citation.