apple / ml-hypersim

Hypersim: A Photorealistic Synthetic Dataset for Holistic Indoor Scene Understanding
Other
1.67k stars 129 forks source link

Building the annotation tool on ubuntu #36

Closed liuzhy71 closed 3 years ago

liuzhy71 commented 3 years ago

I am now building the scene annotation tool on ubuntu 18.04. But I notice that the makefile are for Mac OS (after all it is an Apple dataset). Is there any successful example for building the tool on Linux? What should I modify in the case?

mikeroberts3000 commented 3 years ago

Hi! Great question. We would love it if all of the Hypersim code is easy to set up on Linux. The reason all of the code is tested primarily on macOS is because that was my development environment when I was writing the code, not because we wanted to make it focused on macOS because it's an Apple dataset 😄

That being said, I don't think there should be any issues building the scene annotation tool on Linux. You might not even need to modify our makefile at all. Just specify the appropriate paths in your system_config.inc file. All of the dependencies that are required to build the annotation tool are cross-platform and well-supported on Linux: args, armadillo, embree, hdf5, IconFontCppHeaders, libigl.

mikeroberts3000 commented 3 years ago

Oh. Actually, there is a tiny bit of platform-specific code in the tool itself. But you might not need to worry about it, depending on what you want to do.

If you just want to save a wireframe screenshot, I don't think you need to do anything.

If you want to do more than that, there is one function you'll need to consider. The open_directory_dialog function launches an "open directory" modal dialog box, blocks until the user selects a directory, and returns the selected directory as a string.

std::string open_directory_dialog()

You'll either need to replace this function with an equivalent function in Linux, or add some command-line arguments to the tool so you never need to call this function for your use case. If you figure out a clean and compact way of launching "open directory" dialog boxes on Linux, please submit a pull request or post here with your findings. I'd love to have a working code example. Note that I wasn't willing to introduce a dependency on a heavyweight GUI library like Qt just for this purpose, so it would be nice to have clean concise native macOS and Linux implementations in the same function guarded by some #ifdefs.

liuzhy71 commented 3 years ago

I just finishing building the tool. And I am about to ask about the open_directory nor working thing.

This is soooo surprising. Took the words out of my mouth!!!!

Thank you very much.