-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[carla] In carla example, save all images and measurements to local disk #1350
Conversation
data = cv2.resize( | ||
data, (self.config["x_res"], self.config["y_res"]), | ||
interpolation=cv2.INTER_AREA) | ||
data = (data.astype(np.float32) - 128) / 128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested both out by using scipy.imsave on the results, and they appear correct.
return image.data.reshape( | ||
self.config["x_res"], self.config["y_res"], 3) | ||
data = image.data.reshape( | ||
self.config["render_y_res"], self.config["render_x_res"], 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: (y, x)
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Awesome work! Quick question: presumably, we're interested in saving the data to local disk for later batch processing? If so, we may care less about real-time performance and more about resolution. In the [private] BDD repo, we were able to get 1920x1080 by dumping to a sequential binary file (i.e., no processing) at ~12 fps on Titan X Maxwell (close to the max others reported). Of course, we need some post-processing to convert that into whatever usable format after the fact. |
Yeah, the motivation here is two fold: off policy RL algorithms can be bootstrapped off of existing data, and also dumping makes it easier to debug training progress. I chose 400x300 to save on disk space -- in your binary format, what's the space usage like? If the code can be shared it might make sense to also save in that format as well for more flexibility in the future. |
I see, makes sense. I've been advised by @fyu that higher resolution is important, but I'll fully admit that I don't know all the factors to consider. I don't know that we're allowed to share the code publicly, but the format for images is really simple: one big file with 4 bytes for each element in the width x height x channels x sensors x time array. We have some code to process this into human-viewable images (e.g., RGB image for scene; log-scale grayscale depth), but reading in the single binary file during replay / training is also much faster than opening a ton of small files. I hesitate to say whether ray should also do this because large binary files aren't usually the way of distributed systems, but it seems perhaps a more reasonable choice in this case since we're effectively using this large file as a log. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
Merged build finished. Test PASSed. |
Test PASSed. |
What do these changes do?
Saves all images (in 400x300) to local disk, along with measurements, action, controls, and reward. The directory structure is as follows: