autodistill / autodistill-detic

DETIC module for use with Autodistill.
https://docs.autodistill.com
MIT License
12 stars 2 forks source link

No module named "Detectron2" Bug Fix #1

Closed artyaltanzaya closed 1 year ago

artyaltanzaya commented 1 year ago

Changes made

In setup.py added CustomInstall class AutodistillDetic for installing dependencies when building. Some minor typo error. Install_detic() function is not removed or modified in the detic_model.py

Tests

Ran in google colab with pip install . and in conda environment in Mac with pip install . and compared the result with pip3 install autodistill-detic in different conda environment.

pip3 install autodistill-detic returns error such as "no module named supervision, autodistill, or detectron2"

With new modified setup.py using pip install ., the errors are fixed.

Please test for further potential errors.

artyaltanzaya commented 1 year ago

removed installation commands!

artyaltanzaya commented 1 year ago

UPDATE: now install works but using the package returns further errors! Will take a look at it and fix it!

`---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[4], line 1
----> 1 base_model = DETIC(ontology=CaptionOntology({"airplane": "airplane"}))

     20 def setup_cfg(args):
---> 21     from centernet.config import add_centernet_config
     22     from detic.config import add_detic_config
     23     cfg = get_cfg()

ModuleNotFoundError: No module named 'centernet'`
capjamesg commented 1 year ago

@artyaltanzaya Can you share the code you are running?

artyaltanzaya commented 1 year ago

To reproduce the bug try running

base_model = DETIC( ontology=CaptionOntology( { "person": "person", } ) ) after installation

FYI, I fixed it on the new commit and now able to run the model!