## Quickstart
Build and start Machine Learning backend on `http://localhost:9090`
```bash
docker-compose up
```
Check if it works:
```bash
$ curl http://localhost:9090/health
{"status":"UP"}
```
Then connect running backend to Label Studio using Machine Learning settings.
## Writing your own model
1. Place your scripts for model training & inference inside root directory. Follow the [API guidelines](#api-guidelines) described bellow. You can put everything in a single file, or create 2 separate one say `my_training_module.py` and `my_inference_module.py`
2. Write down your python dependencies in `requirements.txt`
3. Open `wsgi.py` and make your configurations under `init_model_server` arguments:
```python
from my_training_module import training_script
from my_inference_module import InferenceModel
init_model_server(
create_model_func=InferenceModel,
train_script=training_script,
...
```
4. Make sure you have docker & docker-compose installed on your system, then run
```bash
docker-compose up --build
```
## API guidelines
#### Inference module
In order to create module for inference, you have to declare the following class:
```python
from htx.base_model import BaseModel
# use BaseModel inheritance provided by pyheartex SDK
class MyModel(BaseModel):
# Describe input types (Label Studio object tags names)
INPUT_TYPES = ('Image',)
# Describe output types (Label Studio control tags names)
INPUT_TYPES = ('Choices',)
def load(self, resources, **kwargs):
"""Here you load the model into the memory. resources is a dict returned by training script"""
self.model_path = resources["model_path"]
self.labels = resources["labels"]
def predict(self, tasks, **kwargs):
"""Here you create list of model results with Label Studio's prediction format, task by task"""
predictions = []
for task in tasks:
# do inference...
predictions.append(task_prediction)
return predictions
```
#### Training module
Training could be made in a separate environment. The only one convention is that data iterator and working directory are specified as input arguments for training function which outputs JSON-serializable resources consumed later by `load()` function in inference module.
```python
def train(input_iterator, working_dir, **kwargs):
"""Here you gather input examples and output labels and train your model"""
resources = {"model_path": "some/model/path", "labels": ["aaa", "bbb", "ccc"]}
return resources
```
没有合适的资源?快使用搜索试试~ 我知道了~
智能标注:基于Labelstudio的UIE半监督深度学习的智能标注方案码源

共90个文件
json:63个
txt:8个
py:8个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉

温馨提示
,智能标注的优势主要包括: 效率更高:智能标注可以自动化地进行标注,能够快速地生成标注结果,减少了人工标注所需的时间和精力,提高了标注效率。 精度更高:智能标注采用了先进的人工智能技术,能够对图像进行深度学习和处理,能够生成更加准确和精细的标注结果,特别是对于一些细节和特征的标注,手动标注往往存在误差较大的问题。 自动纠错:智能标注可以自动检测标注结果中的错误,并进行自动修正,能够有效地避免标注错误带来的影响,提高了标注的准确性。 灵活性更强:智能标注可以根据不同的应用场景和需求,生成不同类型的标注结果,能够满足用户的多样化需求,提高了标注的适用性。 项目链接:https://blog.csdn.net/sinat_39620217/article/details/129833001 https://blog.csdn.net/sinat_39620217/article/details/129835638
资源推荐
资源详情
资源评论
















收起资源包目录







































































































































共 90 条
- 1
资源评论

- 2301_768660712023-09-20资源值得借鉴的内容很多,那就浅学一下吧,值得下载!
- 我不是企鹅2023-07-10简直是宝藏资源,实用价值很高,支持!
- weixin_440299002023-07-07发现一个宝藏资源,资源有很高的参考价值,赶紧学起来~
- m0_741663112023-06-26资源内容详细全面,与描述一致,对我很有用,有一定的使用价值。
- m0_750400092023-04-10简直是宝藏资源,实用价值很高,支持!

汀、人工智能
- 粉丝: 5w+
- 资源: 277
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


安全验证
文档复制为VIP权益,开通VIP直接复制
