arXiv | หน้าโครงการ
หยุนจือ จาง, จื่อจาง หลี่, แมตต์ โจว, ซ่างเจ๋อ วู, เจียจุน วู arXiv ก่อนพิมพ์ปี 2024

conda create --name sclg python=3.11 conda activate sclg pip install mitsuba # if you run into segmentation fault, you might need specific mitsuba versions # e.g., `pip install --force-reinstall mitsuba==3.5.1` on MacOS pip install unidecode Pillow anthropic transforms3d astor ipdb scipy jaxtyping imageio # required for minecraft renderer pip install spacy python -m spacy download en_core_web_md pip install --force-reinstall numpy==1.26.4 # to be compatible with transforms3d git clone https://github.com/zzyunzhi/scene-language.git cd scene-language pip install -e .
รับคีย์ Anthropic API ของคุณตามเอกสารอย่างเป็นทางการและเพิ่มลงใน engine/key.py :
ANTHROPIC_API_KEY = 'YOUR_ANTHROPIC_API_KEY' OPENAI_API_KEY = 'YOUR_OPENAI_API_KEY' # optional, required for `LLM_PROVIDER='gpt'`
By default, we use Claude 3.5 Sonnet. คุณสามารถเปลี่ยนไปใช้โมเดลภาษาอื่นได้โดยตั้งค่า LLM_PROVIDER ใน engine/constants.py
python scripts/run.py --tasks " a chessboard with a full set of chess pieces "
การเรนเดอร์จะถูกบันทึกไปที่ ${PROJ_ROOT}/scripts/outputs/run_${timestep}_${uuid}/${scene_name}_${uuid}/${sample_index}/renderings/*.gif
ตัวอย่างผลลัพธ์ (เอาต์พุตดิบที่นี่):
| "a chessboard with a full set of chess pieces" | "กระดานซูโดกุขนาด 9x9 เต็มไปด้วยตัวเลขบางส่วน" | "ฉากที่ได้รับแรงบันดาลใจจาก Egon Schiele" | "โคลอสเซียมโรมัน" | "หุ่นแมงมุม" |
|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
ENGINE_MODE=minecraft python scripts/run.py --tasks " a detailed cylindrical medieval tower "
ฉากที่สร้างขึ้นจะถูกบันทึกเป็นไฟล์ json ใน ${PROJ_ROOT}/scripts/outputs/run_${timestep}_${uuid}/${scene_name}_${uuid}/${sample_index}/renderings/*.json For visualization, run the following command:
python viewers/minecraft/run.py
จากนั้นเปิด http://127.0.0.1:5001 ในเบราว์เซอร์ของคุณแล้วลากไฟล์ json ที่สร้างขึ้นไปยังหน้าเว็บ
Example results (raw outputs here):
| "a witch's house in Halloween" | "หอคอยยุคกลางทรงกระบอกที่มีรายละเอียด" | "แบบจำลองโดยละเอียดของ Picachu" | "สโตนเฮนจ์" | "วิหารกรีก" |
|---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
python scripts/run.py --tasks ./resources/examples/ * --cond image --temperature 0.8
ตารางต่อไปนี้แสดงรายการฟังก์ชันตัวช่วยที่กำหนดไว้ในไฟล์นี้ตามนิพจน์ที่กำหนดในภาษาเฉพาะโดเมน (DSL) (ตารางที่ 2 และ 5 ของบทความนี้):
| การนำไปปฏิบัติ | ดีเอสแอล |
|---|---|
register | bind |
library_call | call |
primitive_call | call |
loop | union-loop |
concat_shapes | union |
transform_shape | transform |
rotation_matrix | rotation |
translation_matrix | translate |
scale_matrix | scale |
reflection_matrix | reflect |
compute_shape_center | compute-shape-center |
compute_shape_min | compute-shape-min |
compute_shape_max | compute-shape-max |
compute_shape_sizes | compute-shape-sizes |
โค้ดเบสปัจจุบันช่วยให้คุณสร้างฉาก 3 มิติพร้อมข้อความหรือรูปภาพแจ้งได้ งานอื่นๆ และตัวเรนเดอร์ที่รายงานในรายงานจะได้รับการสนับสนุนในการอัปเดตในอนาคต
โปรดส่ง PR หรือส่งอีเมลถึงเราหากคุณมีคำขอคุณสมบัติ ข้อเสนอแนะในการปรับปรุง หรือต้องการแบ่งปันผลลัพธ์ของคุณ
หากคุณพบว่างานนี้มีประโยชน์ โปรดพิจารณาอ้างอิงรายงานของเรา:
@article { zhang2024scenelanguage , title = { The Scene Language: Representing Scenes with Programs, Words, and Embeddings } , author = { Yunzhi Zhang and Zizhang Li and Matt Zhou and Shangzhe Wu and Jiajun Wu } , year = { 2024 } , journal = { arXiv preprint arXiv:2410.16770 } , }