Skip to content

Conversation

@RONAK-AI647
Copy link
Contributor

I was trying to run examples/robot/lifelong_learning_bench/semantic-segmentation to learn the use of Ianvs. However, the entire process of running this example was not so easy. So after many iterations and checks I have verified the example and updated the README.md so could any user can understand it well.

What type of PR is this?

/kind bug
/kind cleanup
/kind documentation

What this PR does / why we need it:
This PR verifies the example and well documents it. This PR involves :

1)Updating the README.md and seperating the parts of simple and sam model.
Verifying the exmpale by running it
2)Removing hard-coded paths
3)Sort out project dependencies and complete the documentation, especially 4)the missing packages and configuration of dataset path.
5)replace print with logger.info for better monitoring.

Which issue(s) this PR fixes:

Fixes #106

1)the print is replaced with logger.in
2) hardcoded paths are removed with relative path
3) the readme made more detaled and clear

Signed-off-by: RONAK <codeitronak226277@gmail.com>
@kubeedge-bot kubeedge-bot added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. labels Aug 12, 2025
@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign moorezheng after the PR has been reviewed.
You can assign the PR to them by writing /assign @moorezheng in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 12, 2025
@RONAK-AI647 RONAK-AI647 changed the title Ronak a1647/ guide for running the example of robot/lifelong learning bench/semantic segmentation #106 open EXAMPLE/robot/lifelong_learning_bench/semantic-segmentation verified and updated. #238 Aug 12, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @RONAK-AI647, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the usability and clarity of the semantic-segmentation example within the ianvs project. It addresses difficulties encountered during the example's execution by providing comprehensive documentation, streamlining setup processes, and improving code logging. The changes aim to make the example more accessible and understandable for new users, ensuring a smoother experience for anyone trying to learn or utilize Ianvs through this example.

Highlights

  • Improved Documentation: The README.md for the semantic segmentation example has been completely overhauled, featuring a detailed table of contents, clear prerequisites, and separate, step-by-step guides for both simple and large vision model (SAM) benchmarking.
  • Streamlined Setup: Instructions for Ianvs setup, virtual environment creation, and dataset preparation have been made more explicit, including direct Kaggle download links and expected dataset directory structures.
  • Dependency Management: A new requirements.txt file has been added specifically for the semantic segmentation example, ensuring all necessary Python packages are easily installable.
  • Path Standardization: Hard-coded absolute paths in various configuration (.yaml) files have been replaced with relative paths, improving portability and consistency across different environments.
  • Enhanced Logging: Numerous print statements across the Python codebase have been replaced with logger.info calls, providing more structured and monitorable output during execution.
  • Git Ignore Updates: Added datasets/ and workspace/ to .gitignore to prevent unnecessary large files from being committed to the repository.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Signed-off-by: RONAK <codeitronak226277@gmail.com>
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly improves the documentation and usability of the semantic segmentation example by updating the README, removing some hardcoded paths, and replacing print statements with a structured logger. These are all valuable changes. However, the review identified several critical issues that need to be addressed. There are still hardcoded paths in the source code, which contradicts one of the main goals of this PR. The new requirements.txt uses latest for dependencies, which harms reproducibility. There's also a critical bug in eval.py due to an incorrect import update, and several configuration files contain invalid values. Addressing these points will greatly improve the quality and reliability of the example.

def train(self, train_data, valid_data=None, **kwargs):
self.trainer = Trainer(self.train_args, train_data=train_data)
print("Total epoches:", self.trainer.args.epochs)
logger.info("Total epoches:", self.trainer.args.epochs)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The logger's info method expects a single string argument for the message. Passing multiple arguments like this will result in a tuple being logged, which is likely not the intended format. Please use string formatting to combine the message and variables into a single string, for example: logger.info(f"Total epoches: {self.trainer.args.epochs}"). This issue is present in multiple files across this PR.

Suggested change
logger.info("Total epoches:", self.trainer.args.epochs)
logger.info(f"Total epoches: {self.trainer.args.epochs}")

@RONAK-AI647 RONAK-AI647 force-pushed the RONAK-A1647/-Guide-for-running-the-example-of-robot/lifelong_learning_bench/semantic-segmentation-#106-Open branch from b3c83a1 to abbd66a Compare August 12, 2025 05:28
@RONAK-AI647
Copy link
Contributor Author

I checked my fork had some mistakes and some wrong files which wee creating confusions. So , I renewed my fork with proper cloning this time , hence the prs are renewed. Thank You.

@RONAK-AI647 RONAK-AI647 changed the title EXAMPLE/robot/lifelong_learning_bench/semantic-segmentation verified and updated. #238 EXAMPLE/robot/lifelong_learning_bench/semantic-segmentation verified and updated. Aug 12, 2025
img_path = self.images[self.split][index].rstrip()
disp_path = self.disparities[self.split][index].rstrip()
#print(index)
#logger.info(index)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out code can be deleted directly.

import mmcv
import pycocotools.mask as maskUtils
from mmdet.visualization.image import imshow_det_bboxes
from mmdet.visualization import DetLocalVisualizer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the module "imshow_det_bboxes" to visualize the results.

@hsj576
Copy link
Member

hsj576 commented Aug 21, 2025

Could you show the results of running this example as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/documentation Categorizes issue or PR as related to documentation. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guide for running the example of robot/lifelong_learning_bench/semantic-segmentation

3 participants