open-mmlab / playground

A central hub for gathering and showcasing amazing projects that extend OpenMMLab with SAM and other exciting features.
Apache License 2.0
1.12k stars 122 forks source link

[label anything] FileNotFoundError when Add Cloud Storage in Linux #101

Open GodfatherPacino opened 1 year ago

GodfatherPacino commented 1 year ago

The default image storage method in label anything is to upload your images to labelstudio backend. But in many cases, the unannotated images have existed at the backend, e.g., the Linux server. When I tried to use the Label studio 'Add Cloud Storage' method and tried to utilize images stored in the server, the Error is: Traceback (most recent call last): File "/root/anaconda3/envs/rtmdet-sam/lib/python3.9/site-packages/label_studio_ml/exceptions.py", line 39, in exception_f return f(*args, **kwargs) File "/root/anaconda3/envs/rtmdet-sam/lib/python3.9/site-packages/label_studio_ml/api.py", line 51, in _predict predictions, model = _manager.predict(tasks, project, label_config, force_reload, try_fetch, **params) File "/root/anaconda3/envs/rtmdet-sam/lib/python3.9/site-packages/label_studio_ml/model.py", line 617, in predict predictions = cls._current_model.model.predict(tasks, **kwargs) File "/mnt/data1/zhangyijun/Code/playground/label_anything/sam/mmdetection.py", line 165, in predict image_path = self.get_local_path(image_url) File "/root/anaconda3/envs/rtmdet-sam/lib/python3.9/site-packages/label_studio_ml/model.py", line 323, in get_local_path return get_local_path(url, project_dir=project_dir, hostname=self.hostname, access_token=self.access_token) File "/root/anaconda3/envs/rtmdet-sam/lib/python3.9/site-packages/label_studio_tools/core/utils/io.py", line 71, in get_local_path raise FileNotFoundError(filepath) FileNotFoundError: /data/images/IMG_20210705_084125__01.jpg

Czs99 commented 1 year ago

I have the same problem

Ekko1992 commented 8 months ago

@GodfatherPacino Just wondering if this issue can be solved if you strictly following the tutorial mentioned in the updated readme file? I still feel a little bit confused, since i used the instruction here (instead of the official one): https://github.com/HumanSignal/label-studio/issues/2086#issuecomment-1080668206