专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

cogstacksystems/medcat-trainer-nginx Docker 镜像 - 轩辕镜像

medcat-trainer-nginx
cogstacksystems/medcat-trainer-nginx
cogstacksystems
MedCAT Trainer NGINX image
0 次下载
⏱️ 镜像拉取更稳定,部署项目不再心跳加速
镜像简介版本下载
⏱️ 镜像拉取更稳定,部署项目不再心跳加速

Medical oncept Annotation Tool Trainer

MedCATTrainer is an interface for building, improving and customising a given Named Entity Recognition and Linking (NER+L) model (MedCAT) for biomedical domain text.

MedCATTrainer was presented at EMNLP/IJCNLP 2019 :tada: here

Table Of Contents

  1. Installation
  2. Admin Setup
  3. User Guide
    1. Create An Annotation Project
      1. Notes
    2. Annotation Interface
      1. Section 1 - Document Summary List
      2. Section 2 - Clinical Text
        1. Additional Annotations
      3. Section 3 - Action Bar
        1. Concept Navigation Buttons
        2. Concept Status Buttons
        3. Submit Button
      4. Section 4 - Header Toolbar
      5. Section 5 - Concept Summary
    3. Meta-Annotations
      1. Meta Annotation Configuration
    4. Project & Tool Administration
      1. Configuring Concept Picker
      2. Downloading Annotations
      3. Cloning Projects
      4. Resetting Projects
      5. Save Models
      6. Download Models
  4. Annotation Guidelines
  5. Advanced Usage

Installation

MedCATtrainer is a docker-compose packaged Django application.

Quick-install script, downloads the docker-compose file, default env var and runs them. 1.

$ git clone [***]
$ cd MedCATtrainer
$ docker-compose up

If you have MedCAT v0.x models, and want to use the trainer please use the following docker-compose file: This refences the latest built image for the trainer that is still compatible with MedCAT v0.x. and under.

$ docker-compose -f docker-compose-mc0x.yml up

If the build fails with an error code 137, the virtual machine running the docker daemon does not have enough memory. Increase the allocated memory to containers in the docker daemon settings CLI or associated docker GUI.

On MAC: [***]

On Windows: [***]

2. MedCATTrainer is now running:

  • The main app is available at http://localhost:8001/
  • The administrator (admin) app is available at http://localhost:8001/admin/

Upon initial install, an example administrator user, example dataset, concept database, vocab and project are setup. The next section provides further details.

3. (Optional), Environment variables are used to configure the app:

ParameterDescription
MEDCAT_CONFIG_FILEMedCAT config file as described here
BEHIND_RPIf you're running MedCATtrainer, use 1, otherwise this defaults to 0 i.e. False
MCTRAINER_PORTThe port to run the trainer app on

Set these and re-run the docker-compose file.

You'll need to docker stop the running containers if you have already run the install.

Administrator Setup

1. The container runs a vanilla django app, that upon initially loaded will create a defaulted administrator user with details:

username: admin
password: admin

2. We strongly recommend creating a new admin user before using the trainer in 'production' and storing sensitive clinical documents on the trainer. To add a new user navigate to select http://localhost:8001/admin/ and select 'Users'.

3. Select 'Add User' and complete the form with a new username / password.

4. Once created, select the new user, and tick the 'Staff Status' or 'Superuser Status' to allow the user to access the admin app.

5. Remove the default admin user by navigating to step 2, select the user and the action

User Guide

Demo

For demonstration purposes and general testing of a current model a stripped back version of the annotator is provided via the 'Demo' tab of the main screen.

This presents a similar looking annotation screen as a real project, described in detail here, but does not force usage of a particular dataset, setup of filters, and other project settings. This view does not allow for 'annotating' identified concepts (or adding new concepts) but allows for users to get a feel for what an existing MedCAT model is capable of annotating in via an interactive model

1. A form to:

  • Select the appropriate project model to view concept annotations for.
  • Clinical text to annotate and display in 2.
  • CUI and TUI filters can be used to only show concepts of interest in 2. For example for a UMLS CDB this could be T047 for "Disease or Syndrome". CUI and TUI filters are combined if entries are included in both form inputs.

2. Example clinical text is displayed here, with text spans highlighted in blue. Click any annotation to show linked concept DB details in 3.

3. Linked concept details from selected concepts from the 2.

Create an Annotation Project

Using the admin page, a configured superuser can create, edit and delete annotation projects.

Annotation projects are used to inspect, validate and improve concepts recognised by MedCAT.

1. Navigate to http://localhost:8001/admin/ and select 'Project annotate entities'.

!Main Menu list

2. 'Add Project Annotate Entities'

!Add Project Annotate Entities button

3. Complete the new annotation project form. The table below provides details the purpose of each field:

ParameterDescription
Name# Name of the project that appears on the landing page
DescriptionExample projects', # Description as it appears on the landing page
Memberslist of users that have access to this project, select the '+' to create new users
DatasetThe set of documents to be annotated. The dataset tabular schema is described below.
Validated DocumentsIgnore this list. Use of this list is described in the forthcoming advanced administrator user guide
Cuis(Optional) A list of comma separated Concept Unique Identifiers (CUIs). Use this to only show precise concepts in this project
CUI File(Optional) A JSON formatted list of CUIs. Can be useful if the project should be setup to annotate large CUI lists extracted gathered from introspection of a CDB. Will be merged with the above 'Cuis' list
Concept DBA MedCAT Concept Database. This should be the resulting file from a call to the function medcat.cdb.CDB.save_dict('name_of_cdb.dat'). Clicking the '+' icon here opens a dialog to upload a CDB file.
vocabA MedCAT Vocabulary. This should be the resulting file from a call to the function medcat.cdb.utils.Vocab.save_dict('name_of_vocab.dat'). Clicking the '+' icon here opens a dialog to upload a vocab file.
cdb_search_filterlist of CDB IDs that are used to lookup concepts during addition of annotations to a document
Require Entity Validation(Default: True) With this option ticked, annotations in the interface, that are made by MedCAT will appear 'grey' indicating they have not been validated. Document submission is dependent upon all 'grey' annotations to be marked by a user. Unticked ensures all annotations are marked 'valid' by default
Train Model On Submit(Default: True) With this option ticked, each document submission trains the configured MedCAT instance with the marked, and added if any, annotations from this document. Unticked, ensures the MedCAT model does not train between submissions.
Add New Entities(Default: False) With this option ticked, allows users to add entirely new concepts to the existing MedCAT CDB. False ensures this option is not available to users.
Restrict Concept Lookup(Default: False) With this option ticked, restricts the concept lookup (add annotation / alternative concept) to only include those CUIs listed in the above filters (either from CUI / TUI list or uploade 'CUI File' list
Terminate Available(Default: True) With this option ticked, the option to terminate an annotated concept will appear
Irrelevant Available(Default: False) With this option ticked, the option to mark an annotated concept as 'irrlevant' will appear
TasksSelect from the list 'Meta Annotation' tasks that will appear once a given annotation has been marked correct.

Datasets can be uploaded in CSV or XLSX format. Example:

nametext
Doc 1Example document text
Doc 2More example text

The name column is optional, and will be auto-generated for each document if not supplied in the upload. Example datasets are supplied under docs/example_data/*.csv

4. Click 'Save' to store the new project.

5. Navigate to the home screen (http://localhost:8001/admin/), login with your username and password setup previously.

6. select your new project to begin annotating documents

Notes

NB. Example Concept and Vocab databses are freely available on MedCAT github. Note. UMLS and SNOMED-CT are licensed products so only these smaller trained concept / vocab databases are made available currently.

More documentation on the creation of UMLS / SNOMED-CT CDBs from respective source data will be released soon.

NNB. Tasks allow for the creation of meta-annotations and their associated set of values an annotator can use. An example 'meta-annotation' could be 'Temporality'. Values could then be 'Past', 'Present', 'Future'.

NB Please NOTE Firefox and IE are currently not supported. Please use Chrome or Safari.

Annotation Interface

The annotation interface can be split initially into 5 sections.

Section 1 - Document Summary List

A list of documents to be completed in this project. Currently selected documents are highlighted in blue left border. Submitted documents are marked with a !tick_mark.

Section 2 - Clinical Text

The selected documents text, highlighted with each concept recognised by the configured MedCAT model. Highlighted spans of text indicate status of the annotation:

  • Grey: A User has not reviewed this span that has been recognised and linked by MedCAT to a CDB concept.
  • Blue: A User has reviewed the span and marked it as correct in terms of its linked MedCAT concept.
  • Red: A User has reviewed the span and marked it as incorrect in terms of its linked MedCAT concept.
  • Dark Red: A User has reviewed the span and marked it to terminate, meaning the text span should never again link to this text span, this informs MedCAT that
  • Turqoise: A User has reviewed the span and marked it as an alternative linked concept. The user has used the 'Concept Picker' to choose the correct concept that should be linked.

Additional Annotations

MedCAT may miss text spans that are acronyms, abbreviations or misspellings of concepts. Missing annotations can be added to the text by directly highlighting the text span, right clicking, selecting 'Add Term', searching for concept (via ID, or name), and selecting Add Term:

-> ->

Select:

  • Add Term: to add this annotation to the text span and link the selected concept
  • Cancel: (Shortcut esc): to cancel adding the annotation to the text.

Section 3 - Action Bar

Concept Navigation

Navigating between the list of concepts as they appear in the document:

  • Action buttons, left and right
  • Left and right arrow keys on keyboard
  • Directly clicking on the concept within the text.

Concept Status Buttons

A concept can be marked with only one status. Status is recorded but only sent to MedCAT for training on submit of the document and if the projects configured with "Train Model On Submit" is ticked.

Submit Button

Submit is disabled until all concepts have been reviewed and marked with a status. Clicking submit will produce
a submission confirmation dialog with an annotation summary. Confirming submission will send all new annotations to MedCATTrainer middle tier, and re-train the MedCAT model. The following document will be selected and annotated by the newly trained MedCAT model

Section 4 - Header Toolbar

Lists the current name of the document under review and the number of remaining documents to annotate in this project action buttons for:

  • : Summary of current annotations. f A similar view is shown before confirmation of submission of the annotations
  • : Help dialog, showing shortcuts for document & concept navigation, concept annotation and submission.
  • : Reset document. If an annotation is incorrectly added, or incorrectly submitted resetting the document will clear all previous annotations and their status.

Section 5 - Concept Summary

Lists the current selected concepts details.

Concept DetailDescription
Annotated TextThe text span linked to the concept
NameThe linked concept name from within the MedCAT CDB
Term IDThe higher level group of concepts that this concept sits under. This may be 'N/A' depending if you CDB is complete with TUIs.
Concept IDThe unique identifier for this linked concept from the MedCAT CDB.
AccuracyThe MedCAT found accuracy of the linked concept for this span. Text spans will have an accuracy 1.0, if they are uniquely identified by that name in the CDB
DescriptionThe MedCAT associated description of the concept. SNOMED-CT does not provide descriptions of concepts, only alternative names whereas UMLS does provide descriptions

Meta Annotations

MedCAT is also able to learn project & context specific annotations that overlay on top of the base layer of concept annotations.

Example use cases of these annotations could be to train models to predict if:

  • all disease concepts were experienced by the patient, a relative, or N/A.
  • all symptom concepts are temporally reference present day, or are historical.
  • all drug concepts are mentions of patients consuming drugs rather than hypothetical mentions.
  • a complaint for a patient is primary or secondary.

MedCATTrainer is configurable (via the administrator app), to allow for the collection of these meta annotations. We currently have not integrated the active learning components of the concept recognition.

Meta Annotation Configuration

To create a new Meta Annotation Task and attach to an existing project:

1. Enter your project configuration settings via the admin page (http://localhost:8001/admin/)

2. At the bottom of the form, select the + icon to bring up the new Meta Annotation Task Form.

3. Complete the form and add additional meta task values if required for your task via the '+' icon and the 'values' input. Values are enumerated options for your specific task. These can be re-used across projects or be project specific. Ensure the default is one of the corresponding values available. Descriptions appear alongside the tasks in interface and in full in the help dialog.

4. Select desired Meta Annotation tasks for the project by holding down (ctrl / cmd) and clicking the meta tasks, then select 'Save' to save the project changes.

5. Meta Annotations now appear in the interface for that project under the concept summary. Meta-annotations only appear for concepts that are correct.

Project / Tool Administration

Concept Picker - CDB Concept Import

The concept picker is used to:

  • Pick alternative concepts for an existing recognised span
  • Pick a concept during the 'Add Term' process.

The available list of concepts is populated via a MedCAT CDB and indexed to enable fast type-ahead style search.

SNOMED-CT / UMLS built databases can contain thousands if not millions of concepts so this process is executed in asynchronous task to ensure the admin page and app are still available for use.

This process should only be done once for each concept universe (i.e. SNOMED-CT, UMLS are 2 distinct concept universes) per deployment or if the underlying MedCAT CDB changes Concepts will be indexed by there CUI, so importing different CDB instances that reference the same concept universe will only import the concepts that are in the set difference.

To make these concepts available to a (or any project):

1. Open the admin app. (http://localhost:8001/admin/)

2. Select 'Concept Dbs'

3. Select the Concept DB entry, and choose the action 'Import Concept', then press the 'Go' button.

Downloading Annotations

Project annotations can be downloaded with or without the source text, especially important if the source text is particularly sensitive and should be not be shared.

1. Open the admin app. (http://localhost:8001/admin/)

2. Select 'Project annotate entities', !Main Menu list

3. Select the project(s) to download the annotations for and select the appropriate action for w/ or w/o source text, then press the 'Go' button. This will download all annotations, the meta-annotations (if any) for all projects selected. Annotations

4. An example jupyter notebook is provided under docs/Processing_Annotations.ipynb.

Clone Project

Cloning Projects is a easy & fast method to create copies of configured projects. This includes the dataset, CDB / vocab reference, meta annotation settings etc. Annotations themselves will not be copied across.

1. Open the admin app. (http://localhost:8001/admin/), and select 'Project annotate entities' (same as above for downloading)

2. Select the project(s) to clone, select the 'Clone projects', then press the 'Go' button.

NB: Cloning projects will use the same CDB instance. If you're double annotating datasets to then calculate agreement scores (IIA, Cohen's Kappa etc.) then uncheck "Train Model On Submit" for each of the projects to ensure the model is not trained by each annotator. If you do want 'online training' of the model, use separate instances of the same model. You can directly upload multiple instances of the same CDB file appropriately named to achieve this.

Reset Project

Use with caution. Resetting projects deletes all annotations and resets a project to its state upon initial creation.

1. Open the admin app. (http://localhost:8001/admin/), and select 'Project annotate entities' (same as above for downloading)

2. Select the project(s) to reset, then press the 'Go' button.

Save Models

We strongly suggest models are not saved within MedCATtrainer then directly used. Instead, we suggest you use the collected annotations from projects to train and test a new MedCAT model.

However, to save the current state of the model you can use:

An API call - <deployment>:<port>/save-models/ that can be used to save the current state of a model. This will overwrite the current CDB file.

Alternatively, login with an 'admin', (i.e. staff or superuser) account and hit the save model button associated with the project.

Download Models

1. Open the admin app. (http://localhost:8001/admin/), and select 'Concept dbs'.

2. Click the CDB item you would like to download.

4. Click the CDB file, you will be prompted to save down the new CDB file. This file will be of the same format you have used previously, i.e. you've called medcat.cdb.save_dict('').

The saved MedCAT models can be used in any instance a regular MedCAT model may be used. I.e. in a jupyter notebook, part of a web service, or further fine-tuning in another MedCATTrainer instance.

The Trainer currently does not support inspection / training / storage of the meta annotation models. These will be integrated in a forthcoming release.

5. To load the new dictionary use medcat.cdb.load_dict('')

Annotation Guidelines

Annotation guidelines can assist guiding annotators when annotating texts for a MedCATTrainer project.

Once an initial guideline has been defined, a pilot project in MedCATTrainer can be used to further refine the guideline.

Advanced Usage

  • ReST API Usage for bulk dataset / project creation: available in: docs/API_Examples.ipynb
查看更多 medcat-trainer-nginx 相关镜像 →
nginx/nginx-ingress logo
nginx/nginx-ingress
NGINX和NGINX Plus入口控制器是专为Kubernetes设计的流量管理工具,主要用于管理外部HTTP/HTTPS流量进入Kubernetes集群,支持请求路由、负载均衡、SSL终止、流量控制等功能,适用于容器化应用和微服务架构,其中NGINX Plus还提供商业支持、高级监控和增强的负载均衡能力,帮助提升集群流量管理的效率与安全性。
1121B+ pulls
上次更新:未知
nginx/nginx-prometheus-exporter logo
nginx/nginx-prometheus-exporter
NGINX Prometheus Exporter用于收集并导出NGINX与NGINX Plus的监控指标,供Prometheus采集以实现对其运行状态的监控。
5050M+ pulls
上次更新:未知
nginxinc/nginx-unprivileged logo
nginxinc/nginx-unprivileged
非特权NGINX Docker构建文件是指用于构建以非root用户身份在Docker容器中运行NGINX的配置文件,通过预设用户权限、环境变量及安全参数,确保NGINX在低权限模式下仍能正常处理HTTP请求、反向代理及负载均衡等功能,有效降低因容器漏洞引发的权限提升风险,适用于对安全性要求较高的生产环境部署场景。
1811B+ pulls
上次更新:未知
nginx/nginx-ingress-operator logo
nginx/nginx-ingress-operator
用于NGINX和NGINX Plus入口控制器的NGINX入口操作器,基于Helm图表构建。
31M+ pulls
上次更新:未知
nginxinc/nginx-s3-gateway logo
nginxinc/nginx-s3-gateway
基于NGINX的认证和缓存网关,用于S3 API后端服务。
65M+ pulls
上次更新:未知
nginx/unit logo
nginx/unit
此仓库已停用,建议用户改用Docker官方提供的镜像,具体官方镜像可通过链接[***]
6610M+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
cogstacksystems/medcat-trainer-nginx
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.