autodistill / autodistill-detic

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

Documentation #6

Open shersoni610 opened 10 months ago

shersoni610 commented 10 months ago

Hello,

Most likely, this package may need a more description about the installation steps. I installed Detic in the last and all the code were installed and working.

However for the Detic. I got the following error on M1: Collecting git+https://github.com/facebookresearch/detectron2.git Cloning https://github.com/facebookresearch/detectron2.git to /private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-req-build-id_gecv7 Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/detectron2.git /private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-req-build-id_gecv7 Resolved https://github.com/facebookresearch/detectron2.git to commit 337ca3490fa7879ceeeadf6c2b73d67504ff4b4f Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [20 lines of output] Traceback (most recent call last): File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/autodistillenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/autodistillenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/autodistillenv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-build-env-1v2q37ui/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-build-env-1v2q37ui/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires self.run_setup() File "/private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-build-env-1v2q37ui/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "/private/var/folders/kb/dq9v0bpn67gb64fkjtrvs38c0000gn/T/pip-build-env-1v2q37ui/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 10, in ModuleNotFoundError: No module named 'torch' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Traceback (most recent call last): File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/DETIC/autodistill-detic/genlabels.py", line 1, in from autodistill_detic import DETIC File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/DETIC/autodistill-detic/autodistill_detic/init.py", line 1, in from autodistill_detic.detic_model import DETIC File "/Users/csv610/Projects/CompVis/ObjectDetection/AutoDistill/DETIC/autodistill-detic/autodistill_detic/detic_model.py", line 96, in from detectron2.config import get_cfg ModuleNotFoundError: No module named 'detectron2' (autodistillenv) $

capjamesg commented 10 months ago

Hello there! The goal is for all Autodistill modules to work out of the box, without having to require additional installation by library users. I apologize for the friction in getting Autodistill DETIC set up.

This issue should be resolved by #4. This fix is not yet live in a Python package release, however. I will send a message here when the newest release of autodistill-detic has been published. We will likely publish a release in the next week. In the interim, you can run:

git clone https://github.com/autodistill/autodistill-detic
pip install -e .

This will allow you to install the package in editable mode so you can use the latest updates that have not yet been distributed in a PyPi release.