NVlabs / latentfusion

LatentFusion: End-to-End Differentiable Reconstruction and Rendering for Unseen Object Pose Estimation
https://arxiv.org/pdf/1912.00416.pdf
Other
213 stars 34 forks source link

On blender preprocessing #9

Open FlashDoghuhu opened 4 years ago

FlashDoghuhu commented 4 years ago

Because I run the program on the server docker. When I run the program(blender -P tools/dataset/preprocess_shapenet.py -- "$SHAPENET_PATH" "$OUT_PATH" --strip-materials --out-name ShapeNetCore-nomat), I always remind me: unable to open a display. What solutions do you have? What's more, can the official explain the functions and details of these five parameters, especially the meaning and setting mode of the latter three parameters, and which friend can explain it.

keunhong commented 3 years ago
  1. I never tried running this in a Docker container so I'm not sure what the issue is. You can try running directly on your machine.
  2. shapenet_dir is the path to the ShapeNet dataset, out_dir is the directory where it's going to output the processed dataset, strip_materials will strip the material information from the model before saving since we don't need it and out_name just sets the name of the output folder.
FlashDoghuhu commented 3 years ago
  1. I never tried running this in a Docker container so I'm not sure what the issue is. You can try running directly on your machine.
  2. shapenet_dir is the path to the ShapeNet dataset, out_dir is the directory where it's going to output the processed dataset, strip_materials will strip the material information from the model before saving since we don't need it and out_name just sets the name of the output folder.

Thanks for your reply, but I still have not resolved this specific problem. The preprocessing command given by the author team (blender -P tools/dataset/preprocess_shapenet.py - "$SHAPENET_PATH" "$OUT_PATH" --strip-materials --out-name ShapeNetCore-nomat), I would like to ask you how use? Can you share your specific blender -P code? Because no matter how I try, the format is wrong, prompting me that there is no output directory. Can you share your specific order? What does ShapeNetCore-nomat refer to? And whether it can run after installing pip install blender? Do you need other dependencies? Looking forward to your reply.

keunhong commented 3 years ago

You need download ShapeNet and set the SHAPENET_PATH to where ShapeNet is. OUT_PATH is just where you want it to save the output, and --out-name is just the name of out folder it's going to make and save the results to. You can check out the code, there's really nothing fancy going on it should be pretty straightforward to see what each parameter does.

To run the script you have to install blender. Try sudo apt install blender.

FlashDoghuhu commented 3 years ago

You need download ShapeNet and set the SHAPENET_PATH to where ShapeNet is. OUT_PATH is just where you want it to save the output, and --out-name is just the name of out folder it's going to make and save the results to. You can check out the code, there's really nothing fancy going on it should be pretty straightforward to see what each parameter does.

To run the script you have to install blender. Try sudo apt install blender.

I'm sorry. Maybe it's because I used blender this way for the first time, so I haven't solved the problem now. It's really uncomfortable to be stuck here. Would you please help me to see what's wrong with my command?My command clearly gives the output name: blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --test_cm ShapeNetCore-nomat

I downloaded the shapenet dataset,This still fails to run, indicating that there is no out name error:

usage: blender [-h] [--strip-materials] --out-name OUT NAME shapenet dir out_ Dir blender: error: the following arguments are required: --out-name Saved session recovery to '/tmp/ quit.blend '

I hope you can reply me and tell me what to do. Thank you very much!

keunhong commented 3 years ago

You haven't set --out-name

FlashDoghuhu commented 3 years ago

You haven't set --out-name

I know this is a stupid question, but how to set outname? Can I have a look at your order?

keunhong commented 3 years ago

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name anything-you-want

FlashDoghuhu commented 3 years ago

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name anything-you-want

I've tried all the possible combinations below, but I still can't. Is this -- out name an existing folder, a folder to be generated or a file?

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name name_test

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name "name_test"

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name/name_test

blender -P /home/latentfusion-master/tools/dataset/preprocess_shapenet.py -- "/media/zero/本地磁盘1/dataset/ShapeNetCore/" "/media/zero/本地磁盘1/dataset/out_dataset/" --strip-materials --out-name/"name_test"

keunhong commented 3 years ago

It will make a folder named that in the output directory you're setting. You can also modify the code to hard code it if it's not working for you.

FlashDoghuhu commented 3 years ago

It will make a folder named that in the output directory you're setting. You can also modify the code to hard code it if it's not working for you.

All kinds of combinations still can't work, indicating that there is no out name. Can I help you with the above instruction code to see if there is any problem? If my output file name is "out"_ How can I write a complete instruction?