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

Created on 24 Jan 2020  路  7Comments  路  Source: dbolya/yolact

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)

Most helpful comment

@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.

All 7 comments

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.

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

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

@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 It would be a great help if you could get started on this, since I'm swamped with other projects.

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

I'll be happy to :+1:
WIP in
https://github.com/dbolya/yolact/pull/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.

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sree3333 picture sree3333  路  10Comments

abhigoku10 picture abhigoku10  路  6Comments

JSharp4273 picture JSharp4273  路  7Comments

breznak picture breznak  路  9Comments

noobgrow picture noobgrow  路  4Comments