You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Label Studio导入预标注JSON图片加载失败求助

Label Studio导入预标注JSON图片加载失败的解决步骤

问题重现

导入的预标注JSON示例:

[
    {
        "id": 51,
        "file_upload": "12.jpg",
        "data": {
            "image": "/data/upload/4/12.jpg"
        },
        "annotations": [...]
    }
]

已将12.jpg复制到本地目录C:\Users\ABC\AppData\Local\label-studio\label-studio\media\upload\4\,但标注时出现错误:

There was an issue loading URL from $image value

Things to look out for:

URL is valid
URL scheme matches the service scheme, i.e. https and https
The static server has wide-open CORS, more on that here
Technical description:
URL: /data/upload/4/12.jpg

修改image字段为本地绝对路径后问题依旧。

解决方法

  • 修正JSON中的image路径格式:Label Studio不直接识别本地绝对路径,需使用相对于其媒体服务的路径。将image字段改为:
    "image": "/upload/4/12.jpg"
    
    或者使用完整的本地服务访问URL(默认端口8080):
    "image": "http://localhost:8080/upload/4/12.jpg"
    
  • 确认file_upload与文件的关联:确保file_upload字段值12.jpg和实际文件名完全一致,且导入JSON时选择「Import as preannotated tasks」方式,让Label Studio关联到已上传的文件。
  • 检查目录权限:确保C:\Users\ABC\AppData\Local\label-studio\label-studio\media\及其子目录、文件有可读权限,避免Label Studio进程无法访问图片。
  • 重启Label Studio服务:修改路径或配置后,完全关闭并重启Label Studio,确保服务加载新的路径配置。
  • 验证项目存储设置:进入项目的「Settings」→「Storage」,确认存储类型为「Local Storage」,且存储路径正确指向Label Studio的media目录。

内容的提问来源于stack exchange,提问作者CPD

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 04:08:21