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

Enh: move train and eval scripts to methods, pip package #299

Open
breznak opened this issue Jan 24, 2020 · 7 comments · May be fixed by #323
Open

Enh: move train and eval scripts to methods, pip package #299

breznak opened this issue Jan 24, 2020 · 7 comments · May be fixed by #323

Comments

@breznak
Copy link
Contributor

breznak commented Jan 24, 2020

Currently train.py and eval.py are implemented as scripts. This causes some problems when interfacing YOLACT from python.

I'd like to propose changing from separate script files (the scripts can still exist for convenience) to more OOP approach and having train(), eval() as part of the Yolact class.

This would allow us to make a pip package for this repo for much easier integration in other projects (currently I suffer with git submodules)

@dbolya
Copy link
Owner

dbolya commented Jan 24, 2020

Hmm, the issue is there's a lot of global set up stuff that goes on since I never intended you to be able to call train() from outside of train.py. I'll see to what extent I have to modify the code to remove all the global stuff.

As for running the model externally (outside of eval.py), yeah I agree that should be top priority as there's a lot of set up involved currently: see #256.

The eval pipeline doesn't have a lot of global side effects though (only 2 changes required according to the last comment in that issue), so that should be easier. Onto the TODO list it goes.

@breznak
Copy link
Contributor Author

breznak commented Jan 26, 2020

The eval pipeline doesn't have a lot of global side effects though (only 2 changes required according to the last comment in that issue), so that should be easier.

applied in PR #304

As for running the model externally (outside of eval.py),

yes, this is an important part of what I meant by "having a (big) framework API" #300

@breznak
Copy link
Contributor Author

breznak commented Jan 26, 2020

The (possible) mmdetection provides an API for eval, visualization, ...
https://github.com/open-mmlab/mmdetection/blob/master/docs/GETTING_STARTED.md#high-level-apis-for-testing-images

Not sure if that's enough or if this code would support it, but it could be a step to standardization.

I never intended you to be able to call train() from outside of train.py

and you're right, calling eval() from code is necessary, but training would be fine with the script, for most cases at least

@breznak
Copy link
Contributor Author

breznak commented Feb 7, 2020

@dbolya do you have some WIP on this? If not, I'd start atleast a small bits of this. We need yolact to be used as a pip package and from another code, ideally.

@breznak breznak linked a pull request Feb 7, 2020 that will close this issue
5 tasks
@dbolya
Copy link
Owner

dbolya commented Feb 10, 2020

@breznak It would be a great help if you could get started on this, since I'm swamped with other projects.

@breznak
Copy link
Contributor Author

breznak commented Feb 10, 2020

if you could get started on this, since I'm swamped with other projects.

I'll be happy to 👍
WIP in
#323

If you have time, please give a high-level review if it's going in the direction you approve of, so I don't develop too deep into something undesired.

@abhigoku10
Copy link

@breznak please do let us knw once its done this work would be really good , can you share your mail id so as to communicate wiht you and support you if required

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

Successfully merging a pull request may close this issue.

3 participants