Question regarding custom_imports and custom data pipeline class #10015
Unanswered
ivansabolic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Cheers,
I have created a new pipeline class following this tutorial.
I am having trouble importing it in my pipeline. I have installed mmdet through pip.
Should I save my custom class in mmdet.datasets.pipelines package (part of source code) or am I able to add it to custom python package in my "project"? If former is the case, do I have to rebuild mmdet from the source code?
Latter would be preferable in my case, however I am having trouble adding it as part of custom_imports.
My class
CustomPipeline
is saved inmy_file.py
which is part ofmy_package
situated on the same level as my train script.Inside config I am trying to do
custom_imports = dict(imports=["my_package"], allow_failed_imports=False)
and then inside the pipelinedict(type='CustomPipeline', ...)
but I am not able to import it. I have also tried adding
from my_file import CustomPipeline
insidemy_package/__init__.py
.Any advice is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions