xiaoyu258 / DocProj

Document Rectification and Illumination Correction using a Patch-based CNN
MIT License
339 stars 86 forks source link

DocProj blender file #9

Closed ghost closed 4 years ago

ghost commented 4 years ago

@xiaoyu258 it's better that you upload the blender file, so that we can generate using our own images. So that you wont need to upload the entire 65GB dataset. The blender file will be enough.

xiaoyu258 commented 4 years ago

I use some three-party materials during rendering which I do not have the copyright to release them. And the Blender code can not run directly on another computer without them. It is also hard to read because it is full of new functions in Blender.

Please refer to this video for how to use Blender to create some geometry distortions on a paper if you are interesting. I also follow the main procedure of this video to create the dataset. https://www.youtube.com/watch?v=M8_5S8Jq5uo&t=395s

ghost commented 4 years ago

@xiaoyu258 Hoping that you stay safe and doing well, After i augment the images in blender, how to generate their Masks and Flows?

xiaoyu258 commented 4 years ago

Thanks a lot! Hope you are safe and sound as well in this special period.

After you render the document image, you can use the same setting to map the texture coordinates of each pixel to an RGB image to render the flow. E.g. , R and G are the 2D texture coordinates and the B channel is used as the mask to indicate whether the pixel has a UV coordinate. And you need to turn off all the lighting and only use diffuse reflection. These all can be achieved by the note editor in Blender.

GokulNC commented 4 years ago

@deepseek Can you please share your code / steps to generate the synthetic documents using Blender?

mcsuy1998 commented 3 years ago

Hello @xiaoyu258 , The texture coordinates you refer to is the uv map used to texture map the image onto the 3d mesh?