Added video logging to Tensorboard to enable visual monitoring on remote servers#109
Added video logging to Tensorboard to enable visual monitoring on remote servers#109TarekSaati wants to merge 1 commit into
Conversation
tsampazk
left a comment
There was a problem hiding this comment.
Thank you @TarekSaati! Amazing work! I see you worked around the current installation issues as well, good job. I discussed with @eakirtas about working on fixing the issues in the very near future and convert everything to gymnasium instead of the old gym version that's causing the issues.
This means #101 this PR will be completed along the one on deepbots. I suggest we go ahead and merge this as-is, since it is very nicely documented and we will take over integrating with gymnasium and any other minor fixes if any, in #101 .
Only thing i need to ask you before merging is to rename the root dir into 'find_and_avoid_v2_video' just to be a little bit clearer that it derives from the v2 to avoid confusion in the future.
|
Sorry i added my comment and deleted and re-added as review. |
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!