## Motivation
Suppose an image is named `jpg.jpg` and its corresponding segmap is
named `jpg.png`.
The original implementation will try to read segmap from `png.png` and
causes FileNotfoundError
## Modification
Only replace the suffix, instead of full string search and replacement.
## BC-breaking (Optional)
Probably no.
## Use cases (Optional)
## Checklist
1. Pre-commit or other linting tools are used to fix the potential lint
issues.
2. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
3. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
4. The documentation has been modified accordingly, like docstring or
example tutorials.
---------
Co-authored-by: 谢昕辰 <xiexinch@outlook.com>
Co-authored-by: CSH <40987381+csatsurnh@users.noreply.github.com>