LeanFly
LeanFly
> 不好意思,可能没表达清楚,不是如何指定config运行代码。我遇到的问题是,在运行代码的中间过程中,GroundingDINO/groundingdino/util/get_tokenlizer.py 第17行,tokenizer = AutoTokenizer.from_pretrained(text_encoder_type),从这个地方再往下运行,需要联网下载一些文件,也就是我一开始问的(报错提示需要下载config.json等文件,放在哪? 在没有联网的服务器上运行,报 OSError: We couldn't connect to https://huggingface.co to load this file, couldn't find it in che cached files and it looks like bert-base-uncased is not...
定位 load_model_hf 这个方法,写一个自己喜欢的调试语句,打印一下 cache_file 在本地的路径,将模型文件拷贝到某个地方,然后注释掉 cache_file 这一行,将 cache_file 指定到本地路径 
> 你可以直接将模型下载到本地,然后我在模型加载那一块有个注释,可以用本地加载的方法 我翻了下报错的log,主要是这个函数请求远程文件时出现的网络报错 ``` def load_model_hf(model_config_path, repo_id, filename, device='cpu'): args = SLConfig.fromfile(model_config_path) model = build_model(args) args.device = device cache_file = hf_hub_download(repo_id=repo_id, filename=filename) checkpoint = torch.load(cache_file, map_location='cpu') log = model.load_state_dict(clean_state_dict(checkpoint['model']), strict=False)...
> 你可以直接将模型下载到本地,然后我在模型加载那一块有个注释,可以用本地加载的方法 调试了一下,找到了模型加载的路径,将文件复制出来,指定为本地的地址确实没有再请求远程文件。 是在 load_model_hf 这个方法里的 cache_file 这里,cache_file 调用了 hf_hub_download 方法下载模型文件,具体的保存地址可以直接 print(cache_file) 来获取,然后将 cache_file 指定为本地的文件即可 
maybe you can shutdown your proxy tool
我使用docker方式安装,遇到这个问题后进入GrouningDino目录,手动执行了一次安装:python setup.py install 运行成功
一直报错。。。。 正在下载验证码... 验证码验证成功 开始登录... 登录失败 错误原因: 验证码校验失败! 账号正在登录中,3 秒后自动重试 账号正在登录中,3 秒后自动重试
抖音的文字点选目前识别确实不稳定。我试了几个库都一般。
估计还是得自定义一波
其实吧,拿到sd的base64了,用python的临时文件搭个桥就可以了。