SpatialLM icon indicating copy to clipboard operation
SpatialLM copied to clipboard

Inquiry on Extracting Layout Data from Structured3D

Open Mr-Neurotic opened this issue 1 year ago • 4 comments

Hello, I am currently working with the Structured3D dataset and would like to extract additional scene layout information, such as the 3D coordinates of the floor and ceiling, in order to explore their structural features in SpatialLM. I was wondering if you could share an example script that demonstrates how to extract the 3D coordinates of the floor and ceiling from the annotation_3d.json file or the corresponding layout files.

I would like to understand the entire extraction process, including data loading, coordinate parsing, and output formatting. Thank you very much!

Mr-Neurotic avatar Sep 14 '25 07:09 Mr-Neurotic

Hi, we mainly adopt the preprocessing script based on the RoomFormer structured3D data preprocessing script here.

A related issue: #67

SamMaoYS avatar Sep 16 '25 04:09 SamMaoYS

Thank you for your reply. I have successfully extracted the structure by following the processing code from Roomformer. I do have another question: will you be releasing a LoRA fine-tuned version of the model in the future?

I attempted to fine-tune the SpatialLM base model (1.1 Qwen) with LoRA on the Structured3D dataset. Following your response in issue #79, I trained for 50 epochs with a learning rate of 1e-4, used a cosine scheduler with a warm-up ratio of 0.03, and AdamW as the optimizer. However, the inference results turned out to be very different. For example, the prediction on scene_000 produced:“wall_0=Wall(136,0,0,136,0,0,72,0) wall_1=Wall(136,0,0,136,0,0,72,0) wall_2=Wall(136,0,0,124,5,0,72,0) wall_3=Wall(136,0,0,124,5,0,72,0) wall_4=Wall(136,0,0,136,0,0,72,0) wall_5=Wall(136,0,0,124,5,0,72,0) wall_6=Wall(136,0,0,124,5,0,72,0) wall_7=Wall(136,0,0,124,5,0,72,0) wall_8=Wall(136,0,0,136,5,0,72,0) wall_9=Wall(136,0,0,136,5,0,72,0) wall_10=Wall(136,5,0,124,5,0,72,0) wall_11=Wall(136,5,0,124,5,0,72,0) door_0=Door(wall_3,120,0,28,22,72) door_1=Door(wall_10,136,0,28,22,72) door_2=Door(wall_2,120,0,28,22,72) door_3=Door(wall_11,136,0,28,22,72) window_0=Window(wall_6,124,0,28,22,72) window_1=Window(wall_10,134,0,28,22,72) window_2=Window(wall_10,134,0,28,22,72) window_3=Window(wall_11,134,0,28,22,72) window_4=Window(wall_11,134,0,28,22,72) window_5=Window(wall_10,134,0,28,22,72) window_6=Window(wall_10,134,0,28,22,72)”,Do you have any suggestions on this? Or perhaps a recommended configuration file for fine-tuning on Structured3D?

Mr-Neurotic avatar Sep 18 '25 09:09 Mr-Neurotic

Hi, it’s great to hear that you are exploring LoRA finetuning methods on this project.

Personally, I haven’t tried finetuning SpatialLM with LoRA. My guess is that the results you’re seeing are not ideal because the gap between the released weights (focused on single-room layouts) and the Structured3D-finetuned model (multi-room layouts) is larger than expected. As a result, LoRA alone may have limited ability to adapt the model weights effectively to Structured3D scenes. For now, you might consider increasing the LoRA rank or trying full-parameter finetuning.

To make smaller LoRA finetuning more effective, I think we still need to strengthen the base SpatialLM model with more diverse and mixed datasets, ideally in open-vocabulary settings that can better leverage LLM capabilities. Once the base model is more robust across varied use cases, lightweight LoRA should be able to achieve better performance on downstream tasks.

I hope this helps clarify your questions.

SamMaoYS avatar Sep 19 '25 03:09 SamMaoYS

Thank you for your suggestion. I will continue to explore LoRA fine-tuning methods.

Mr-Neurotic avatar Sep 21 '25 08:09 Mr-Neurotic