Spaces:
Sleeping
Sleeping
Add files using upload-large-folder tool
Browse files
README.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
colorFrom: purple
|
| 5 |
-
colorTo: pink
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.3.0
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
---
|
| 11 |
-
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: user_study
|
| 3 |
+
app_file: user_study.py
|
|
|
|
|
|
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 6.3.0
|
|
|
|
|
|
|
| 6 |
---
|
|
|
|
|
|
captions.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"foodcart": "A street food cart: canopy, menu board, skewers on a grill, and a small cash box; include wooden wheels and handle.",
|
| 3 |
+
"ans": "Cute 3D character of a white robot astronaut, small backpack, stubby boots.",
|
| 4 |
+
"firetruck": "A cartoon fire truck in deep red with white accents, silver ladder on top, black tires.",
|
| 5 |
+
"helmet": "a chunky sci-fi helmet in matte white with teal visor glow, vents, and subtle scratches",
|
| 6 |
+
"backpack": "a compact hiking backpack in olive green with orange straps, zipper pulls, and a rolled sleeping mat",
|
| 7 |
+
"sword": "a stylized short sword with a cobalt-blue blade, gold crossguard, and leather-wrapped grip",
|
| 8 |
+
"shield": "a round wooden shield with iron rim, painted navy crest, and chipped paint edges",
|
| 9 |
+
"potion": "a round glass potion bottle with purple liquid, cork stopper, label tag, and tiny bubbles",
|
| 10 |
+
"ring": "a chunky gold ring with a faceted ruby, engraved band, and polished reflections",
|
| 11 |
+
"camera": "a retro instant camera in pastel yellow with a big lens, flash cube, and worn corners",
|
| 12 |
+
"radio": "a portable cassette radio in black and red with knobs, antenna, and sticker decals",
|
| 13 |
+
"robot": "a small helper robot with a round body, sky-blue paint, screen face, and tiny tool arms",
|
| 14 |
+
"toycar": "a die-cast race car in bright orange with white stripes, spoiler, and rubbery tires",
|
| 15 |
+
"chair": "a low-poly gaming chair in red and gray with stitched cushions, wheels, and metal frame",
|
| 16 |
+
"tablelamp": "a desk lamp in brushed aluminum with a warm bulb, adjustable joints, and soft shadowing",
|
| 17 |
+
"guitar": "a small acoustic guitar in cherry wood with visible grain, metal strings, and a glossy finish",
|
| 18 |
+
"book": "a spellbook with deep green cover, gold embossing, corner metal guards, and a ribbon bookmark",
|
| 19 |
+
"treasure": "a wooden treasure chest with iron straps, golden coins peeking out, and worn edges",
|
| 20 |
+
"airship": "a steampunk airship with a brass gondola, cream balloon envelope, side propellers, hanging ropes, and small lanterns",
|
| 21 |
+
"bridge": "a miniature suspension bridge with two towers, thick main cables, many thin hanger cables, and a wooden deck, cartoon style",
|
| 22 |
+
"chandelier": "an ornate chandelier in gold metal with multiple thin arms, candle-shaped bulbs, and dangling crystal beads",
|
| 23 |
+
"submarine": "a cartoon submarine with a rounded navy-blue hull, yellow accents, circular portholes, a small periscope, and a rear propeller",
|
| 24 |
+
"wheelchair": "a wheelchair with large rear wheels, small front casters, dark gray frame, blue seat cushion, and visible push handles",
|
| 25 |
+
"marketstall": "a market stall with a striped red-and-white canopy, wooden counter, baskets of fruit, crates, and a small lantern",
|
| 26 |
+
"treehouse": "a treehouse built into a large tree trunk with wooden platforms, rope railings, hanging lanterns, and a small ladder"
|
| 27 |
+
}
|
debug_fix.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import trimesh
|
| 2 |
+
import numpy as np
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
def to_double_sided_gray_obj(mesh_path, out_path, gray=180):
|
| 6 |
+
print(f"Processing: {mesh_path}")
|
| 7 |
+
if not os.path.exists(mesh_path):
|
| 8 |
+
print(f"File not found: {mesh_path}")
|
| 9 |
+
return
|
| 10 |
+
|
| 11 |
+
# Load with process=True to cleanup
|
| 12 |
+
m = trimesh.load(mesh_path, process=True, force='mesh')
|
| 13 |
+
|
| 14 |
+
# Handle Scene
|
| 15 |
+
if isinstance(m, trimesh.Scene):
|
| 16 |
+
if len(m.geometry) == 0:
|
| 17 |
+
print("Empty scene")
|
| 18 |
+
return
|
| 19 |
+
m = trimesh.util.concatenate(tuple(m.geometry.values()))
|
| 20 |
+
|
| 21 |
+
# 1. Fix normals on original
|
| 22 |
+
m.fix_normals()
|
| 23 |
+
|
| 24 |
+
# 2. Duplicate and flip for backfaces
|
| 25 |
+
m_back = m.copy()
|
| 26 |
+
m_back.faces = np.fliplr(m_back.faces)
|
| 27 |
+
m_back.fix_normals()
|
| 28 |
+
|
| 29 |
+
# 3. Combine
|
| 30 |
+
m_combined = trimesh.util.concatenate([m, m_back])
|
| 31 |
+
|
| 32 |
+
# 4. Color
|
| 33 |
+
vc = np.tile(np.array([gray, gray, gray, 255], dtype=np.uint8), (len(m_combined.vertices), 1))
|
| 34 |
+
m_combined.visual = trimesh.visual.ColorVisuals(mesh=m_combined, vertex_colors=vc)
|
| 35 |
+
|
| 36 |
+
# 5. Export
|
| 37 |
+
m_combined.export(out_path)
|
| 38 |
+
print(f"Saved double-sided mesh to: {out_path}")
|
| 39 |
+
return m_combined
|
| 40 |
+
|
| 41 |
+
# Test on the reported problematic mesh
|
| 42 |
+
mesh_path = "./ours_meshes/treehouse_rmapple.glb"
|
| 43 |
+
out_path = "./debug_treehouse_double_sided.glb"
|
| 44 |
+
|
| 45 |
+
# Run the fix
|
| 46 |
+
mesh = to_double_sided_gray_obj(mesh_path, out_path)
|
| 47 |
+
|
| 48 |
+
# If running in a notebook, this might show the viewer:
|
| 49 |
+
if mesh:
|
| 50 |
+
try:
|
| 51 |
+
mesh.show()
|
| 52 |
+
except:
|
| 53 |
+
pass
|
trellis_meshes/017_cubify64.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
trellis_meshes/weatherworn_misc_paper_machine3_cubify64.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
trellis_meshes_text/bridge_cubified64.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
trellis_meshes_text/firetruck_cubified64.obj
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|