IDEA-Research / T-Rex

[ECCV2024] API code for T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy
https://deepdataspace.com/blog/T-Rex
Other
2.28k stars 147 forks source link

python demo_examples/interactive_inference.py --token <your_token> #31

Closed CUIcaicai closed 8 months ago

CUIcaicai commented 8 months ago

excuse me,when i use your tool like this, python demo_examples/interactive_inference.py --token what token should be? i set is as a img dir,and i get the error like this:

raceback (most recent call last): File "demo_examples/interactive_inference.py", line 53, in results = trex2.interactve_inference(prompts) File "/home/cl/devData2/gitclone/T-Rex/trex/model_wrapper.py", line 79, in interactve_inference image=self.client.upload_file(prompt["prompt_image"]), File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/dds_cloudapi_sdk/client.py", line 67, in upload_file rsp = requests.post(sign_url, json=data, headers=headers, timeout=2) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, kwargs) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/urllib3/connectionpool.py", line 496, in _make_request conn.request( File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/urllib3/connection.py", line 399, in request self.putheader(header, value) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/site-packages/urllib3/connection.py", line 313, in putheader super().putheader(header, *values) File "/home/cl/devData2/anaconda3/envs/trex/lib/python3.8/http/client.py", line 1229, in putheader values[i] = one_value.encode('latin-1') UnicodeEncodeError: 'latin-1' codec can't encode characters in position 26-27: ordinal not in range(256)

Mountchicken commented 8 months ago

Hi @CUIcaicai <your_token> refers to the API token for the access of T-Rex2. You can get this API token by sending a request to this email address (weiliu@idea.edu.cn) and attach your usage purpose as well as your institution.

Mountchicken commented 8 months ago

I'll close this issue now. Feel free to re-open it.