question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
breznakcommented, 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.

1reaction
dbolyacommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transfer learning and fine-tuning | TensorFlow Core
Transfer learning is usually done for tasks where your dataset has too little data to train a full-scale model from scratch.
Read more >
Python Script package - Automation Anywhere Documentation
The Python Script package contains actions that enable Python Script functions in a task.
Read more >
A Comprehensive Hands-on Guide to Transfer Learning with ...
In transfer learning, you can leverage knowledge (features, weights etc) from previously trained models for training newer models and even ...
Read more >
What does model.eval() do in pytorch? - python - Stack Overflow
model.eval() is a kind of switch for some specific layers/parts of the model that behave differently during training and inference ...
Read more >
Python Best Practices - Every Python Developer Must Know
PEP stands for Python Enhancement Proposals- these are guidelines and standards for development. This is to make sure all Python code looks and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found