[Re-opened] Added video logging to Tensorboard to enable visual monitoring on remote servers#110
Merged
Merged
Conversation
Contributor
Author
|
My apologizes, the former PR was closed accidentally. I changed the example name as required. Have a nice day! |
tsampazk
approved these changes
Apr 8, 2025
tsampazk
left a comment
Member
There was a problem hiding this comment.
Thank you @TarekSaati ! As explained here, we can go ahead and merge this!
Member
|
@all-contributors please add @TarekSaati for code and examples ! |
Contributor
|
I've put up a pull request to add @TarekSaati! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone!
Since Deepworlds offers robotic training examples in virtualized environments that depend on intense trial and error, it is preferable to run simulations on a remote (Headless) GPU sever that one might not have the ability to open X sessions. However, even on desktop OS variants, visual monitoring is costly and training is often conducted with no-render option for acceleration. In addition, different performance metrics and parameters are monitored and updated periodically through Tensorboard logging. In light of this, it becomes more convenient for learners and developers to periodically monitor agent training visually by logging not only scalars, but videos captured by a front camera mounted on the robot. As one might see, this feature opens the door for not only visual monitoring, but also for visual navigation using advances CNN-based RL models as well!
Here is an example video for the resulted visualization tab added to Tensorboard.
Changes (find_and_avoid_v2_robot_supervisor.py):
__init__:Changes (training.py):
1- Import Video from logger:
2- Add necessary variables to AdditionalInfoCallback class:
add in the constructor:
3- Implement the on_step() event handler to record frames periodically:
4- Add video creation and logging to tensorboard to on_rollout_end() event:
5- Add render parameters to run() function:
Notes:
Steps to run:
git clone https://github.com/TarekSaati/deepworlds.git cd deepworlds pip install -r requirements/requirements.txtcd examples/find_and_avoid_with_videoIn a new prompt, run Tensorboard command with host 0.0.0.0 option to give clients access to Tensorboard:
Have fun monitoring your training agents!