ZoneMaestro_code / eval /LayoutVLM /test_end_to_end.sh
kkkkiiii's picture
Add files using upload-large-folder tool
231562a verified
#!/bin/bash
# 测试端到端Pipeline的脚本
# 包含多个不同场景的用户设计描述
set -e # 遇到错误立即退出
# 激活conda环境
source ~/miniconda3/etc/profile.d/conda.sh
conda activate layoutvlm2
ASSET_DIR="/home/v-meiszhang/backup/objaverse_processed"
BASE_OUTPUT_DIR="./results/e2e_tests"
echo "=========================================="
echo "🧪 开始测试端到端Pipeline"
echo "=========================================="
echo ""
# Test 1: 简约书房
echo "=========================================="
echo "Test 1: 简约书房"
echo "=========================================="
python end_to_end_pipeline.py \
--user_text "a minimalist study room with a large desk, comfortable office chair, bookshelves, and a reading corner. The room should have plenty of natural light and be suitable for long hours of work and reading." \
--asset_dir "$ASSET_DIR" \
--save_dir "$BASE_OUTPUT_DIR/study_room" \
$RETRIEVAL_MODE
echo "✅ Test 1 completed"
echo ""
# Test 2: 温馨卧室
echo ""
echo "=========================================="
echo "Test 2: 温馨卧室"
echo "=========================================="
python end_to_end_pipeline.py \
--user_text "a cozy bedroom with a queen-size bed, bedside tables with lamps, a dresser, and a small seating area near the window. The style should be warm and inviting with soft lighting." \
--asset_dir "$ASSET_DIR" \
--save_dir "$BASE_OUTPUT_DIR/cozy_bedroom" \
$RETRIEVAL_MODE
echo "✅ Test 2 completed"
echo ""
# Test 3: 现代客厅
echo ""
echo "=========================================="
echo "Test 3: 现代客厅"
echo "=========================================="
python end_to_end_pipeline.py \
--user_text "a modern living room with a large sectional sofa facing a TV entertainment center. Include a coffee table, side tables, floor lamp, and some decorative plants." \
--asset_dir "$ASSET_DIR" \
--save_dir "$BASE_OUTPUT_DIR/modern_living" \
$RETRIEVAL_MODE
echo "✅ Test 3 completed"
echo ""
# 测试4: 儿童游戏室
echo "🎮 Test 4: Children's Playroom"
echo "----------------------------------------"
python end_to_end_pipeline.py \
--user_text "a fun and safe children's playroom with toy storage cabinets, a small table and chairs for activities, soft play mats on the floor, and a bookshelf. Ensure there is plenty of open space for movement and play, with child-safe furniture." \
--asset_dir "$ASSET_DIR" \
--save_dir "$BASE_OUTPUT_DIR/test4_playroom"
echo "✅ Test 4 completed"
echo ""
# Test 5: 咖啡厅角落
echo ""
echo "=========================================="
echo "Test 5: 咖啡厅角落"
echo "=========================================="
python end_to_end_pipeline.py \
--user_text "a cozy corner of a coffee shop with 2-3 small round tables, comfortable chairs, a display counter for pastries, coffee machine, and some potted plants." \
--asset_dir "$ASSET_DIR" \
--save_dir "$BASE_OUTPUT_DIR/cafe_corner" \
$RETRIEVAL_MODE
echo "✅ Test 5 completed"
echo ""
echo "=========================================="
echo "🎉 所有测试完成!"
echo "=========================================="
echo ""
echo "📊 测试结果汇总:"
echo " 测试1 (书房): $BASE_OUTPUT_DIR/test1_study_room"
echo " 测试2 (卧室): $BASE_OUTPUT_DIR/test2_cozy_bedroom"
echo " 测试3 (客厅): $BASE_OUTPUT_DIR/test3_modern_living"
echo " 测试4 (游戏室): $BASE_OUTPUT_DIR/test4_playroom"
echo " 测试5 (咖啡店): $BASE_OUTPUT_DIR/test5_cafe_corner"
echo ""
echo "每个测试目录包含:"
echo " - scene_config.json (场景配置)"
echo " - layout.json (优化后的布局)"
echo " - final.gif (优化过程动画)"
echo " - final_rendering/ (最终3D渲染图)"
echo ""