Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] ML backend returns an incorrect response #6866

Open
yuanjiechen opened this issue Jan 8, 2025 · 5 comments
Open

[ERROR] ML backend returns an incorrect response #6866

yuanjiechen opened this issue Jan 8, 2025 · 5 comments

Comments

@yuanjiechen
Copy link

Describe the bug
When I annotate images, whether it's with points or bounding boxes (bbox), there should be real-time mask output. However, there isn't any, and the Label Studio process reports the following error:
[ERROR] ML backend returns an incorrect response, results field must be a list with at least one item

To Reproduce
Steps to reproduce the behavior:

  1. Follow the docs prepare the environment (conda)
  2. Install sam2 requirement and label studio ml backend
  3. Command: label studio start
  4. Command in another terminal: label-studio-ml start ./segment_anything_2_image
  5. Upload dataset and link model # Success in GUI

label studio output
=> Database and media directory: /home/chenyj/.local/share/label-studio
=> Static URL is set to: /static/
=> Database and media directory: /home/chenyj/.local/share/label-studio
=> Static URL is set to: /static/
Read environment variables from: /home/chenyj/.local/share/label-studio/.env
get 'SECRET_KEY' casted as '<class 'str'>' with default ''
Starting new HTTPS connection (1): pypi.org:443
Can't get latest version
Traceback (most recent call last):
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1060, in _validate_conn
conn.connect()
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
self.sock = conn = self._new_conn()
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f3445a5c490>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/connectionpool.py", line 801, in urlopen
retries = retries.increment(
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/urllib3/util/retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/label-studio/json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3445a5c490>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/label_studio/core/utils/common.py", line 364, in get_latest_version
response = requests.get(pypi_url, timeout=10).text
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/label-studio/json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3445a5c490>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
January 07, 2025 - 09:37:48
Django version 4.2.17, using settings 'label_studio.core.settings.label_studio'
Starting development server at http://0.0.0.0:8080/
Quit the server with CONTROL-C.

[2025-01-07 09:37:51,210] [django.server::log_message::212] [INFO] "GET / HTTP/1.1" 302 0
[2025-01-07 09:37:51,210] [django.server::log_message::212] [INFO] "GET / HTTP/1.1" 302 0
[2025-01-07 09:37:51,252] [django.server::log_message::212] [INFO] "GET /projects/ HTTP/1.1" 200 31056
[2025-01-07 09:37:51,252] [django.server::log_message::212] [INFO] "GET /projects/ HTTP/1.1" 200 31056
[2025-01-07 09:37:51,344] [django.server::log_message::212] [INFO] "GET /static/css/uikit.bee6fc38db3d.css HTTP/1.1" 200 3868
[2025-01-07 09:37:51,344] [django.server::log_message::212] [INFO] "GET /static/css/uikit.bee6fc38db3d.css HTTP/1.1" 200 3868
[2025-01-07 09:37:51,361] [django.server::log_message::212] [INFO] "GET /react-app/main.css?v=fbe086 HTTP/1.1" 200 97182
[2025-01-07 09:37:51,361] [django.server::log_message::212] [INFO] "GET /react-app/main.css?v=fbe086 HTTP/1.1" 200 97182
[2025-01-07 09:37:51,468] [django.server::log_message::212] [INFO] "GET /static/css/Toast.min.0479912dd9c5.css HTTP/1.1" 200 1213
[2025-01-07 09:37:51,468] [django.server::log_message::212] [INFO] "GET /static/css/Toast.min.0479912dd9c5.css HTTP/1.1" 200 1213
[2025-01-07 09:37:51,480] [django.server::log_message::212] [INFO] "GET /static/css/main.03e0d1342adf.css HTTP/1.1" 200 15925
[2025-01-07 09:37:51,480] [django.server::log_message::212] [INFO] "GET /static/css/main.03e0d1342adf.css HTTP/1.1" 200 15925
[2025-01-07 09:37:51,482] [django.server::log_message::212] [INFO] "GET /react-app/runtime.js?v=fbe086 HTTP/1.1" 200 6142
[2025-01-07 09:37:51,482] [django.server::log_message::212] [INFO] "GET /react-app/runtime.js?v=fbe086 HTTP/1.1" 200 6142
[2025-01-07 09:37:51,492] [django.server::log_message::212] [INFO] "GET /static/js/jquery.min.e6c2415c0ace.js HTTP/1.1" 200 87462
[2025-01-07 09:37:51,492] [django.server::log_message::212] [INFO] "GET /static/js/jquery.min.e6c2415c0ace.js HTTP/1.1" 200 87462
[2025-01-07 09:37:51,495] [django.server::log_message::212] [INFO] "GET /react-app/vendor.js?v=1 HTTP/1.1" 200 267667
[2025-01-07 09:37:51,495] [django.server::log_message::212] [INFO] "GET /react-app/vendor.js?v=1 HTTP/1.1" 200 267667
[2025-01-07 09:37:51,501] [django.server::log_message::212] [INFO] "GET /react-app/main.js?v=fbe086 HTTP/1.1" 200 1163000
[2025-01-07 09:37:51,501] [django.server::log_message::212] [INFO] "GET /react-app/main.js?v=fbe086 HTTP/1.1" 200 1163000
[2025-01-07 09:37:51,541] [django.server::log_message::212] [INFO] "GET /static/js/helpers.f7452c3c8dbf.js HTTP/1.1" 200 5517
[2025-01-07 09:37:51,541] [django.server::log_message::212] [INFO] "GET /static/js/helpers.f7452c3c8dbf.js HTTP/1.1" 200 5517
[2025-01-07 09:37:51,634] [django.server::log_message::212] [INFO] "GET /static/js/Toast.min.9135be1633df.js HTTP/1.1" 200 2371
[2025-01-07 09:37:51,634] [django.server::log_message::212] [INFO] "GET /static/js/Toast.min.9135be1633df.js HTTP/1.1" 200 2371
[2025-01-07 09:37:51,742] [django.server::log_message::212] [INFO] "GET /static/fonts/Figtree-SemiBold.ttf HTTP/1.1" 200 40852
[2025-01-07 09:37:51,742] [django.server::log_message::212] [INFO] "GET /static/fonts/Figtree-SemiBold.ttf HTTP/1.1" 200 40852
[2025-01-07 09:37:51,759] [django.server::log_message::212] [INFO] "GET /api/version HTTP/1.1" 200 966
[2025-01-07 09:37:51,759] [django.server::log_message::212] [INFO] "GET /api/version HTTP/1.1" 200 966
[2025-01-07 09:37:51,798] [django.server::log_message::212] [INFO] "GET /api/projects?page=1&page_size=30&include=id%2Ctitle%2Ccreated_by%2Ccreated_at%2Ccolor%2Cis_published%2Cassignment_settings HTTP/1.1" 200 263
[2025-01-07 09:37:51,798] [django.server::log_message::212] [INFO] "GET /api/projects?page=1&page_size=30&include=id%2Ctitle%2Ccreated_by%2Ccreated_at%2Ccolor%2Cis_published%2Cassignment_settings HTTP/1.1" 200 263
[2025-01-07 09:37:51,807] [django.server::log_message::212] [INFO] "GET /static/icons/logo.svg HTTP/1.1" 200 9254
[2025-01-07 09:37:51,807] [django.server::log_message::212] [INFO] "GET /static/icons/logo.svg HTTP/1.1" 200 9254
[2025-01-07 09:37:51,912] [django.server::log_message::212] [INFO] "GET /projects/ HTTP/1.1" 200 31056
[2025-01-07 09:37:51,912] [django.server::log_message::212] [INFO] "GET /projects/ HTTP/1.1" 200 31056
[2025-01-07 09:37:51,928] [django.server::log_message::212] [INFO] "GET /api/projects?ids=3&include=id%2Cdescription%2Cnum_tasks_with_annotations%2Ctask_number%2Cskipped_annotations_number%2Ctotal_annotations_number%2Ctotal_predictions_number%2Cground_truth_number%2Cfinished_task_number&page_size=30 HTTP/1.1" 200 264
[2025-01-07 09:37:51,928] [django.server::log_message::212] [INFO] "GET /api/projects?ids=3&include=id%2Cdescription%2Cnum_tasks_with_annotations%2Ctask_number%2Cskipped_annotations_number%2Ctotal_annotations_number%2Ctotal_predictions_number%2Cground_truth_number%2Cfinished_task_number&page_size=30 HTTP/1.1" 200 264
[2025-01-07 09:37:51,956] [django.server::log_message::212] [INFO] "GET /static/fonts/Figtree-Regular.ttf HTTP/1.1" 200 40584
[2025-01-07 09:37:51,956] [django.server::log_message::212] [INFO] "GET /static/fonts/Figtree-Regular.ttf HTTP/1.1" 200 40584
[2025-01-07 09:37:53,719] [django.server::log_message::212] [INFO] "GET /sw.js HTTP/1.1" 200 6086
[2025-01-07 09:37:53,719] [django.server::log_message::212] [INFO] "GET /sw.js HTTP/1.1" 200 6086
[2025-01-07 09:38:11,629] [django.server::log_message::212] [INFO] "GET /react-app/531.css HTTP/1.1" 200 21839
[2025-01-07 09:38:11,629] [django.server::log_message::212] [INFO] "GET /react-app/531.css HTTP/1.1" 200 21839
[2025-01-07 09:38:11,670] [django.server::log_message::212] [INFO] "GET /react-app/492.js HTTP/1.1" 200 208043
[2025-01-07 09:38:11,670] [django.server::log_message::212] [INFO] "GET /react-app/492.js HTTP/1.1" 200 208043
[2025-01-07 09:38:11,698] [django.server::log_message::212] [INFO] "GET /react-app/814.css HTTP/1.1" 200 55032
[2025-01-07 09:38:11,698] [django.server::log_message::212] [INFO] "GET /react-app/814.css HTTP/1.1" 200 55032
[2025-01-07 09:38:11,712] [django.server::log_message::212] [INFO] "GET /api/projects/3 HTTP/1.1" 200 3916
[2025-01-07 09:38:11,712] [django.server::log_message::212] [INFO] "GET /api/projects/3 HTTP/1.1" 200 3916
[2025-01-07 09:38:11,723] [django.server::log_message::212] [INFO] "GET /react-app/82.css HTTP/1.1" 200 2021642
[2025-01-07 09:38:11,723] [django.server::log_message::212] [INFO] "GET /react-app/82.css HTTP/1.1" 200 2021642
[2025-01-07 09:38:11,763] [django.server::log_message::212] [INFO] "GET /react-app/531.js HTTP/1.1" 200 264141
[2025-01-07 09:38:11,763] [django.server::log_message::212] [INFO] "GET /react-app/531.js HTTP/1.1" 200 264141
[2025-01-07 09:38:11,824] [django.server::log_message::212] [INFO] "GET /react-app/814.js HTTP/1.1" 200 721057
[2025-01-07 09:38:11,824] [django.server::log_message::212] [INFO] "GET /react-app/814.js HTTP/1.1" 200 721057
[2025-01-07 09:38:11,826] [django.server::log_message::212] [INFO] "GET /react-app/82.js HTTP/1.1" 200 1192245
[2025-01-07 09:38:11,826] [django.server::log_message::212] [INFO] "GET /react-app/82.js HTTP/1.1" 200 1192245
[2025-01-07 09:38:11,867] [django.server::log_message::212] [INFO] "GET /react-app/637.js HTTP/1.1" 200 1592751
[2025-01-07 09:38:11,867] [django.server::log_message::212] [INFO] "GET /react-app/637.js HTTP/1.1" 200 1592751
[2025-01-07 09:38:12,237] [django.server::log_message::212] [INFO] "GET /api/ml?project=3 HTTP/1.1" 200 406
[2025-01-07 09:38:12,237] [django.server::log_message::212] [INFO] "GET /api/ml?project=3 HTTP/1.1" 200 406
[2025-01-07 09:38:12,301] [django.server::log_message::212] [INFO] "GET /api/dm/columns?project=3 HTTP/1.1" 200 4244
[2025-01-07 09:38:12,301] [django.server::log_message::212] [INFO] "GET /api/dm/columns?project=3 HTTP/1.1" 200 4244
[2025-01-07 09:38:12,430] [django.server::log_message::212] [INFO] "GET /api/dm/project?project=3 HTTP/1.1" 200 4100
[2025-01-07 09:38:12,430] [django.server::log_message::212] [INFO] "GET /api/dm/project?project=3 HTTP/1.1" 200 4100
[2025-01-07 09:38:12,594] [django.server::log_message::212] [INFO] "GET /api/users?project=3 HTTP/1.1" 200 235
[2025-01-07 09:38:12,594] [django.server::log_message::212] [INFO] "GET /api/users?project=3 HTTP/1.1" 200 235
[2025-01-07 09:38:12,604] [django.server::log_message::212] [INFO] "GET /api/dm/actions?project=3 HTTP/1.1" 200 2086
[2025-01-07 09:38:12,604] [django.server::log_message::212] [INFO] "GET /api/dm/actions?project=3 HTTP/1.1" 200 2086
[2025-01-07 09:38:12,634] [django.server::log_message::212] [INFO] "GET /api/dm/views?project=3 HTTP/1.1" 200 975
[2025-01-07 09:38:12,634] [django.server::log_message::212] [INFO] "GET /api/dm/views?project=3 HTTP/1.1" 200 975
[2025-01-07 09:38:12,781] [django.server::log_message::212] [INFO] "GET /api/tasks?page=1&page_size=30&view=3&project=3 HTTP/1.1" 200 17848
[2025-01-07 09:38:12,781] [django.server::log_message::212] [INFO] "GET /api/tasks?page=1&page_size=30&view=3&project=3 HTTP/1.1" 200 17848
[2025-01-07 09:38:13,136] [django.server::log_message::212] [INFO] "GET /data/upload/3/0f9b662b-42.jpg HTTP/1.1" 200 1043053
[2025-01-07 09:38:13,136] [django.server::log_message::212] [INFO] "GET /data/upload/3/0f9b662b-42.jpg HTTP/1.1" 200 1043053
[2025-01-07 09:38:13,139] [django.server::log_message::212] [INFO] "GET /data/upload/3/3dc776a3-34.jpg HTTP/1.1" 200 1113642
[2025-01-07 09:38:13,139] [django.server::log_message::212] [INFO] "GET /data/upload/3/3dc776a3-34.jpg HTTP/1.1" 200 1113642
[2025-01-07 09:38:13,146] [django.server::log_message::212] [INFO] "GET /data/upload/3/2d7a3ec1-53.jpg HTTP/1.1" 200 1139472
[2025-01-07 09:38:13,146] [django.server::log_message::212] [INFO] "GET /data/upload/3/2d7a3ec1-53.jpg HTTP/1.1" 200 1139472
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/b2d705a3-35.jpg HTTP/1.1" 200 1243283
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/7ba62430-84.jpg HTTP/1.1" 200 1264111
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/b2d705a3-35.jpg HTTP/1.1" 200 1243283
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/7ba62430-84.jpg HTTP/1.1" 200 1264111
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/16cbe09d-101.jpg HTTP/1.1" 200 934751
[2025-01-07 09:38:13,152] [django.server::log_message::212] [INFO] "GET /data/upload/3/16cbe09d-101.jpg HTTP/1.1" 200 934751
[2025-01-07 09:38:13,379] [django.server::log_message::212] [INFO] "GET /data/upload/3/01021922-19.jpg HTTP/1.1" 200 939450
[2025-01-07 09:38:13,379] [django.server::log_message::212] [INFO] "GET /data/upload/3/01021922-19.jpg HTTP/1.1" 200 939450
[2025-01-07 09:38:13,397] [django.server::log_message::212] [INFO] "GET /data/upload/3/f7dc4889-1.jpg HTTP/1.1" 200 1308627
[2025-01-07 09:38:13,397] [django.server::log_message::212] [INFO] "GET /data/upload/3/f7dc4889-1.jpg HTTP/1.1" 200 1308627
[2025-01-07 09:38:13,399] [django.server::log_message::212] [INFO] "GET /data/upload/3/5073f3ed-14.jpg HTTP/1.1" 200 869923
[2025-01-07 09:38:13,399] [django.server::log_message::212] [INFO] "GET /data/upload/3/f5a69979-41.jpg HTTP/1.1" 200 1087297
[2025-01-07 09:38:13,399] [django.server::log_message::212] [INFO] "GET /data/upload/3/5073f3ed-14.jpg HTTP/1.1" 200 869923
[2025-01-07 09:38:13,399] [django.server::log_message::212] [INFO] "GET /data/upload/3/f5a69979-41.jpg HTTP/1.1" 200 1087297
[2025-01-07 09:38:13,400] [django.server::log_message::212] [INFO] "GET /data/upload/3/a8440d07-58.jpg HTTP/1.1" 200 1134537
[2025-01-07 09:38:13,400] [django.server::log_message::212] [INFO] "GET /data/upload/3/a8440d07-58.jpg HTTP/1.1" 200 1134537
[2025-01-07 09:38:13,410] [django.server::log_message::212] [INFO] "GET /data/upload/3/6aac7909-64.jpg HTTP/1.1" 200 1221966
[2025-01-07 09:38:13,410] [django.server::log_message::212] [INFO] "GET /data/upload/3/6aac7909-64.jpg HTTP/1.1" 200 1221966
[2025-01-07 09:38:13,542] [django.server::log_message::212] [INFO] "GET /data/upload/3/62038b4d-30.jpg HTTP/1.1" 200 1089431
[2025-01-07 09:38:13,542] [django.server::log_message::212] [INFO] "GET /data/upload/3/62038b4d-30.jpg HTTP/1.1" 200 1089431
[2025-01-07 09:38:13,547] [django.server::log_message::212] [INFO] "GET /data/upload/3/11a39dad-45.jpg HTTP/1.1" 200 1104235
[2025-01-07 09:38:13,547] [django.server::log_message::212] [INFO] "GET /data/upload/3/11a39dad-45.jpg HTTP/1.1" 200 1104235
[2025-01-07 09:38:13,570] [django.server::log_message::212] [INFO] "GET /data/upload/3/c6be5916-100.jpg HTTP/1.1" 200 1176483
[2025-01-07 09:38:13,570] [django.server::log_message::212] [INFO] "GET /data/upload/3/c6be5916-100.jpg HTTP/1.1" 200 1176483
[2025-01-07 09:38:13,654] [django.server::log_message::212] [INFO] "GET /data/upload/3/e94e7763-86.jpg HTTP/1.1" 200 883441
[2025-01-07 09:38:13,654] [django.server::log_message::212] [INFO] "GET /data/upload/3/e94e7763-86.jpg HTTP/1.1" 200 883441
[2025-01-07 09:38:13,951] [django.server::log_message::212] [INFO] "GET /data/upload/3/26b2e898-82.jpg HTTP/1.1" 200 1190084
[2025-01-07 09:38:13,951] [django.server::log_message::212] [INFO] "GET /data/upload/3/26b2e898-82.jpg HTTP/1.1" 200 1190084
[2025-01-07 09:38:13,964] [django.server::log_message::212] [INFO] "GET /data/upload/3/df6f8088-9.jpg HTTP/1.1" 200 1067973
[2025-01-07 09:38:13,964] [django.server::log_message::212] [INFO] "GET /data/upload/3/df6f8088-9.jpg HTTP/1.1" 200 1067973
[2025-01-07 09:38:13,973] [django.server::log_message::212] [INFO] "GET /data/upload/3/ae032535-95.jpg HTTP/1.1" 200 983872
[2025-01-07 09:38:13,973] [django.server::log_message::212] [INFO] "GET /data/upload/3/ae032535-95.jpg HTTP/1.1" 200 983872
[2025-01-07 09:38:13,977] [django.server::log_message::212] [INFO] "GET /data/upload/3/2db6d171-67.jpg HTTP/1.1" 200 1166551
[2025-01-07 09:38:13,977] [django.server::log_message::212] [INFO] "GET /data/upload/3/2db6d171-67.jpg HTTP/1.1" 200 1166551
[2025-01-07 09:38:13,989] [django.server::log_message::212] [INFO] "GET /data/upload/3/4b909fc4-63.jpg HTTP/1.1" 200 1175285
[2025-01-07 09:38:13,989] [django.server::log_message::212] [INFO] "GET /data/upload/3/4b909fc4-63.jpg HTTP/1.1" 200 1175285
[2025-01-07 09:38:13,993] [django.server::log_message::212] [INFO] "GET /data/upload/3/5d7766ad-103.jpg HTTP/1.1" 200 948858
[2025-01-07 09:38:13,993] [django.server::log_message::212] [INFO] "GET /data/upload/3/5d7766ad-103.jpg HTTP/1.1" 200 948858
[2025-01-07 09:38:14,112] [django.server::log_message::212] [INFO] "GET /data/upload/3/d28f682f-28.jpg HTTP/1.1" 200 872851
[2025-01-07 09:38:14,112] [django.server::log_message::212] [INFO] "GET /data/upload/3/d28f682f-28.jpg HTTP/1.1" 200 872851
[2025-01-07 09:38:14,121] [django.server::log_message::212] [INFO] "GET /data/upload/3/620c4d50-102.jpg HTTP/1.1" 200 982793
[2025-01-07 09:38:14,121] [django.server::log_message::212] [INFO] "GET /data/upload/3/620c4d50-102.jpg HTTP/1.1" 200 982793
[2025-01-07 09:38:14,138] [django.server::log_message::212] [INFO] "GET /data/upload/3/98034090-71.jpg HTTP/1.1" 200 1216077
[2025-01-07 09:38:14,138] [django.server::log_message::212] [INFO] "GET /data/upload/3/98034090-71.jpg HTTP/1.1" 200 1216077
[2025-01-07 09:38:14,419] [ml.models::_get_predictions_from_ml_backend::303] [ERROR] ML backend returns an incorrect response, results field must be a list with at least one item
[2025-01-07 09:38:14,437] [django.server::log_message::212] [INFO] "GET /api/tasks/1?project=3 HTTP/1.1" 200 2587
[2025-01-07 09:38:14,437] [django.server::log_message::212] [INFO] "GET /api/tasks/1?project=3 HTTP/1.1" 200 2587
[2025-01-07 09:38:14,481] [django.server::log_message::212] [INFO] "GET /react-app/99.js HTTP/1.1" 200 1910
[2025-01-07 09:38:14,481] [django.server::log_message::212] [INFO] "GET /react-app/99.js HTTP/1.1" 200 1910
[2025-01-07 09:38:14,656] [django.server::log_message::212] [INFO] "GET /api/projects/3/label-stream-history?project=3 HTTP/1.1" 200 34
[2025-01-07 09:38:14,656] [django.server::log_message::212] [INFO] "GET /api/projects/3/label-stream-history?project=3 HTTP/1.1" 200 34
/home/chenyj/anaconda3/envs/label-studio/lib/python3.10/site-packages/rest_framework/pagination.py:207: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'labels_manager.models.LabelLink'> QuerySet.
paginator = self.django_paginator_class(queryset, page_size)
[2025-01-07 09:38:14,800] [django.server::log_message::212] [INFO] "GET /api/label_links?project=3&expand=label HTTP/1.1" 200 52
[2025-01-07 09:38:14,800] [django.server::log_message::212] [INFO] "GET /api/label_links?project=3&expand=label HTTP/1.1" 200 52
[2025-01-07 09:38:20,150] [django.server::log_message::212] [INFO] "POST /api/tasks/1/annotations?project=3 HTTP/1.1" 201 701
[2025-01-07 09:38:20,150] [django.server::log_message::212] [INFO] "POST /api/tasks/1/annotations?project=3 HTTP/1.1" 201 701
[2025-01-07 09:38:20,254] [ml.models::_get_predictions_from_ml_backend::303] [ERROR] ML backend returns an incorrect response, results field must be a list with at least one item
[2025-01-07 09:38:20,273] [django.server::log_message::212] [INFO] "GET /api/tasks/1?project=3 HTTP/1.1" 200 3380
[2025-01-07 09:38:20,273] [django.server::log_message::212] [INFO] "GET /api/tasks/1?project=3 HTTP/1.1" 200 3380
[2025-01-07 09:38:20,365] [django.server::log_message::212] [INFO] "GET /api/label_links?project=3&expand=label HTTP/1.1" 200 52
[2025-01-07 09:38:20,365] [django.server::log_message::212] [INFO] "GET /api/label_links?project=3&expand=label HTTP/1.1" 200 52
[2025-01-07 09:41:02,924] [urllib3.connectionpool::urlopen::826] [WARNING] Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f338c784e20>, 'Connection to o227124.ingest.sentry.io timed out. (connect timeout=None)')': /api/5820521/envelope/
^CSentry is attempting to send 2 pending events
Waiting up to 2 seconds
Press Ctrl-C to quit

label studio ml output:
label-studio-ml start ./segment_anything_2_image

  • Serving Flask app 'label_studio_ml.api'
  • Debug mode: off
    [2025-01-07 17:37:29,015] [INFO] [werkzeug::_log::97] WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
  • Running on all addresses (0.0.0.0)
  • Running on http://127.0.0.1:9090
  • Running on http://...:9090 ############ ------> here I hide the ip for privacy issue.
    [2025-01-07 17:37:29,015] [INFO] [werkzeug::_log::97] Press CTRL+C to quit
    [2025-01-07 17:38:12,217] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:12] "GET /health HTTP/1.1" 200 -
    [2025-01-07 17:38:12,226] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:12] "POST /setup HTTP/1.1" 200 -
    [2025-01-07 17:38:14,396] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:14] "GET /health HTTP/1.1" 200 -
    [2025-01-07 17:38:14,402] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:14] "POST /setup HTTP/1.1" 200 -
    [2025-01-07 17:38:14,418] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:14] "POST /predict HTTP/1.1" 200 -
    [2025-01-07 17:38:20,145] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:20] "POST /webhook HTTP/1.1" 201 -
    [2025-01-07 17:38:20,232] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:20] "GET /health HTTP/1.1" 200 -
    [2025-01-07 17:38:20,237] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:20] "POST /setup HTTP/1.1" 200 -
    [2025-01-07 17:38:20,253] [INFO] [werkzeug::_log::97] 127.0.0.1 - - [07/Jan/2025 17:38:20] "POST /predict HTTP/1.1" 200 -

Environment (please complete the following information):

  • OS: Ubuntu 20.04
  • torch 2.5.1
  • python 3.10.11
  • Label Studio Version 1.15.0/1.14.0
  • label studio sdk 1.0.8/1.0.7
  • label studio ml 2.0.1.dev0
  • numpy 1.26.4

I missed some important steps?
Thanks!

@heidi-humansignal
Copy link
Collaborator

Hello,

This typically happens when prediction formats is incorrect, do you mind showing your labeling interface and prediction format that your are using?

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

@yuanjiechen
Copy link
Author

yuanjiechen commented Jan 13, 2025

Hi @heidi-humansignal
Thanks for your reply!
After I run server backend and ML backend, connect server to ML model.
2025-01-13 01-22-22屏幕截图

I used the label interface in docs now.

<Style> .main { font-family: Arial, sans-serif; background-color: #f5f5f5; margin: 0; padding: 20px; } .container { display: flex; justify-content: space-between; margin-bottom: 20px; } .column { flex: 1; padding: 10px; background-color: #fff; border-radius: 5px; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); text-align: center; } .column .title { margin: 0; color: #333; } .column .label { margin-top: 10px; padding: 10px; background-color: #f9f9f9; border-radius: 3px; } .image-container { width: 100%; height: 300px; background-color: #ddd; border-radius: 5px; } </Style> Choose Label
    <Label value="defect" background="#FFA39E"/></BrushLabels>
  </View>
</View>
<View className="column">
  <View className="title">Use Keypoint</View>
  <View className="label">
    <KeyPointLabels name="tag2" toName="image" smart="true">
      
      
    <Label value="defect" background="#250dd3"/></KeyPointLabels>
  </View>
</View>
<View className="column">
  <View className="title">Use Rectangle</View>
  <View className="label">
    <RectangleLabels name="tag3" toName="image" smart="true">
      
      
    <Label value="defect" background="#FFC069"/></RectangleLabels>
  </View>
</View>

And I upload the jpg images to create a project.
Click point mark (defect2)
2025-01-13 01-25-55屏幕截图
Click object and submit.
2025-01-13 01-26-33屏幕截图
The server terminal will report the error.

[2025-01-13 01:27:52,875] [ml.models::_get_predictions_from_ml_backend::303] [ERROR] ML backend returns an incorrect response, results field must be a list with at least one item

If it work normally, I can preview the mask, am I right?
Thanks
YJ

@heidi-humansignal
Copy link
Collaborator

Hello,

It seems like the prediction structure is not correct. Do you mind showing that? How are you setting up your predictions?

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

@yuanjiechen
Copy link
Author

Hi @heidi-humansignal :
Thanks for your fast reply !
2025-01-16 02-34-41屏幕截图
Predition means this page setup?
Oh this config means connect the model output to label studio interface?

YJ

@heidi-humansignal
Copy link
Collaborator

Hello,

No, how is your prediction structure in ML-backend? do you mind showing predict method?

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants