Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError #1

Open
XALEX-123 opened this issue Dec 3, 2024 · 4 comments
Open

ImportError #1

XALEX-123 opened this issue Dec 3, 2024 · 4 comments

Comments

@XALEX-123
Copy link

XALEX-123 commented Dec 3, 2024

Hi, thank to your great job!
When I try to use test.py, it has such error:
File "test.py", line 175, in <module> main() File "test.py", line 106, in main from vatrack import build_model ImportError: cannot import name 'build_model' from 'vatrack' (/home/jovyan/work/alex/vatrack/vatrack/__init__.py)

When I check init.py, it only content:

from vatrack.version import __version__, short_version

__all__ = ['__version__', 'short_version'] 

Is this corrct? if not, how should I modify.

I don't know how to deal with it, can you help me out?
Thank you very much!

@jasminlisa
Copy link
Collaborator

Hi,
thanks for your interest. For me the init.py looks exactly the same, so this should not be the issue.
I cannot reproduce this error though. So currently, I am also not sure what causes it. Maybe some installation issue?

@XALEX-123
Copy link
Author

`from vatrack.models.builder import MODELS, TRACKERS, build_model, build_tracker
from vatrack.datasets.builder import build_dataloader`

I add those code in init.py and it works.
Right now I am still working on it, if there's any problem I will come here again, haha

Thanks your rapid reply (it's really fast)

@XALEX-123
Copy link
Author

Sorry, one more question.

If I want to test on my custom data, how should I prepare it? Should I use a .json file or any suggested folder path?

I’ve created a simple dataset that contains a few pictures in one folder and applied some transformations. However, I encountered an error saying I should input a mapping, not a tensor.

Is there anything I missed?

@jasminlisa
Copy link
Collaborator

Hi, when I input custom data I always create a new json file following the style of the ones for the SAILVOS data. That usually worked well for me. Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants