UMassLowell-Vision-Group / From-Virtual-to-Reality

From Virtual to Reality: Fast Adaptation of Virtual Object Detectors to Real Domains
BSD 2-Clause "Simplified" License
10 stars 6 forks source link

brief steps for (Generating dataset from CAD model) #1

Open amiltonwong opened 8 years ago

amiltonwong commented 8 years ago

Dear baochens,

I'm interested in your work (Generating dataset from CAD model) Would you list the brief steps for performing the task (Generating dataset from CAD model) using your code?

Thanks in advance!

Milton

baochens commented 8 years ago

Hi Milton,

Thanks for your interest in our work. The source code is available in 'code' folder. The render.ms is the file for the rendering part. All the rendered images (with annotation) are in these two folders: 'virtual' and 'virtual_gray'. The 3D models is in the '3d_models' folder. Basically, here are the brief steps:

  1. Download the 3D models
  2. Run render.ms in 3ds Max (the software we used to generate the dataset) The are also limited comments in render.ms which might help you understand the code.

To generate more realistic images (as in the 'What Do Deep CNNs Learn About Object' paper), you may need to specify different background and texture for different category/3d model. Then you need to change the 'images_bg' and 'images_texture' in the render.ms file to point to different background and textures for different category/3d model.

For now, we did not implemented the full photorealistic rendering since it is more complicated (e.g. might need to use ray-tracking algorithms to do that) and takes far more time (e.g. hours) to render one image. However, as showed in the 'From-Virtual-to-Reality' paper, simple domain adaptation techniques can get same performance as training classifiers with real images (e.g. images from ImageNet).

I hope this helps, feel free to reply to this post or send me separate email (at bsun@cs.uml.edu) if you still need more help/explanation.

Regards, Baochen

amiltonwong commented 8 years ago

Baochen, thank you so much. I'll try it.

Milton

amiltonwong commented 8 years ago

Hi, Baochen, I had git cloned your repos (3D models , code, virtual,..etc) I use Autodesk 3ds MAX 2015 (student version) to run render.ms, but after following the steps from "http://goo.gl/FlfCZt", nothing happens. Did I miss some steps?

baochens commented 8 years ago

Hi Milton,

Please change all these paths in render.ms to your local setting accordingly: images_bg = getFiles "C:\Users\baochens\Desktop\photorealistic\imageall\" images_texture = getFiles "C:\Users\baochens\Desktop\photorealistic\imageall\" file_path = "C:\Users\baochens\Desktop\photorealistic\3d_models_all\"+category+"*.max" file_name = ...

What's more, there should be some output while running the maxscript indicating what's going on (e.g., 'OK', 'error...').

Regards, Baochen