Calling Yolact from another Python file
See original GitHub issueHi @dbolya,
Thanks again for such a useful model.
I am trying to use yolact inside another file and I will use its outputs in terms of masks, bounding-boxes, confidence rates and classes.
But it gives errors when I import yolact.eval
--> ImportError: cannot import name 'Yolact'
If I import yolact
, there is no error. If I from yolact import eval
--> ImportError: cannot import name 'Yolact'
, it gives the same error.
After import yolact
without no errors, I type yolact
and it gives <module 'yolact' (namespace)>
. But if I import another lib, it shows the path to that.
How can I call eval.py from another python file and use its outputs?
By the way my config is python 3.6, pytorch 1.0.1, cuda 9.0…
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
python - How to save information about the result of instance ...
To save the classes and scores as a csv file: ... I think it's being called 3 times from different regions in eval.py....
Read more >YOLACT++ Instance Segmentation (Google Colab Tutorial)
Learn the basics of YOLACT ++ and try it out in a free Google Colab notebook. Tutorial: https://www.immersivelimit.com/tutori... … Show more.
Read more >Converting a PyTorch YOLACT Model
Before converting the model, create a patch file for the repository. ... export to ONNX --- eval.py | 5 ++++- utils/augmentations.py | 7...
Read more >Files · main · Hee Joon Yoon / yoloact - GitLab
In order to use YOLACT++, make sure you compile the DCNv2 code. ... Process an image and save it to another file. python...
Read more >How to train YOLACT: Real-time instance segmentation with ...
For the dataset configuration, open the yolact/data/config.py file and go to the “DATASETS” section. Create a copy from dataset_base and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What does your final structure look like? It sounds like you’re importing
yolact.py
not importing from the yolact directory. Though that’s actually what you want (importing yolact.py, that is).Here’s the rough procedure:
Sorry for the number of lines of code necessary to do this. I should probably make an example script and put it on the readme or something. (Also this code is untested, if there are any bugs lmk).
@zyxdb
For a lack of better solution (or rather inability to find one), I just commented calling
mask_proto_debug
out inoutput_utils.py
line 63:“Fixed” the problem without any devastating consequences (for now)