mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

[Feature] Request to remove the LoadImageFromFile Module requirement when using mmpretrain

Open ok97465 opened this issue 1 year ago • 1 comments

Motivation

Hello, thank you for your great work.

I'm working on converting mmpretrain Network to mmdeploy.

The LoadImageFromFile module must be present in mmpretrain's test_pipeline for it to work.

Is there any way to remove this as an option? This is causing too much code modification for me.

Thank you in advance.

Related resources

https://github.com/open-mmlab/mmdeploy/blob/3f8604bd72e8e15d06b2e0552fe2fdb8f8de33c4/mmdeploy/codebase/mmpretrain/deploy/classification.py#L58-L60

Additional context

No response

ok97465 avatar Nov 18 '24 02:11 ok97465

Hi, you can remove those lines in your local after installing mmdeploy. Path to the file should be inside site-packages of python location.

For example, if you are using conda, then probably it is /opt/conda/lib/python3.10/site-packages/mmdeploy/codebase/mmpretrain/deploy/classification.py. Note that python3.10 subdirectory name can be different depending on your python version.

You can open the file using text editors like nano or vim, make necessary changes, and save. Changes will be applied immediately to the package. I would recommend to comment it rather than removing so that later you can revert changes easily. Hope it helps.

tojimahammatov avatar Jan 14 '25 06:01 tojimahammatov