当前位置: 首页 > news >正文

网站建设公司专业网站制作开发痘痘怎么去除效果好

网站建设公司专业网站制作开发,痘痘怎么去除效果好,昆明装饰企业网络推广,东莞市广建建设工程有限公司Nougat:结合光学神经网络,引领学术PDF文档的智能解析、挖掘学术论文PDF的价值 这是Nougat的官方存储库,Nougat是一种学术文档PDF解析器,可以理解LaTeX数学和表格。 Project page: https://facebookresearch.github.io/nougat/ …

Nougat:结合光学神经网络,引领学术PDF文档的智能解析、挖掘学术论文PDF的价值

这是Nougat的官方存储库,Nougat是一种学术文档PDF解析器,可以理解LaTeX数学和表格。

Project page: https://facebookresearch.github.io/nougat/

1.安装

From pip:

pip install nougat-ocr

From repository:

pip install git+https://github.com/facebookresearch/nougat

Note, on Windows: If you want to utilize a GPU, make sure you first install the correct PyTorch version. Follow instructions here

如果您想从API调用模型或生成数据集,则会有额外的依赖项。
安装通过

pip install "nougat-ocr[api]" or pip install "nougat-ocr[dataset]"

1.2 获取PDF的预测

1.2.1 CLI

To get predictions for a PDF run

$ nougat path/to/file.pdf -o output_directory

目录或文件的路径(其中每行都是PDF的路径)也可以作为位置参数传递

$ nougat path/to/directory -o output_directory
usage: nougat [-h] [--batchsize BATCHSIZE] [--checkpoint CHECKPOINT] [--model MODEL] [--out OUT][--recompute] [--markdown] [--no-skipping] pdf [pdf ...]positional arguments:pdf                   PDF(s) to process.options:-h, --help            show this help message and exit--batchsize BATCHSIZE, -b BATCHSIZEBatch size to use.--checkpoint CHECKPOINT, -c CHECKPOINTPath to checkpoint directory.--model MODEL_TAG, -m MODEL_TAGModel tag to use.--out OUT, -o OUT     Output directory.--recompute           Recompute already computed PDF, discarding previous predictions.--full-precision      Use float32 instead of bfloat16. Can speed up CPU conversion for some setups.--no-markdown         Do not add postprocessing step for markdown compatibility.--markdown            Add postprocessing step for markdown compatibility (default).--no-skipping         Don't apply failure detection heuristic.--pages PAGES, -p PAGESProvide page numbers like '1-4,7' for pages 1 through 4 and page 7. Only works for single PDFs.

The default model tag is 0.1.0-small. If you want to use the base model, use 0.1.0-base.

$ nougat path/to/file.pdf -o output_directory -m 0.1.0-base

In the output directory every PDF will be saved as a .mmd file, the lightweight markup language, mostly compatible with Mathpix Markdown (we make use of the LaTeX tables).

Note: On some devices the failure detection heuristic is not working properly. If you experience a lot of [MISSING_PAGE] responses, try to run with the --no-skipping flag. Related: #11, #67

1.2.2 API

With the extra dependencies you use app.py to start an API. Call

$ nougat_api

通过向http://127.0.0.1:8503/ predict/发出POST请求来获得PDF文件的预测。它还接受参数“start”和“stop”,以限制计算选择页码(包括边界)。

响应是一个带有文档标记文本的字符串。

curl -X 'POST' \'http://127.0.0.1:8503/predict/' \-H 'accept: application/json' \-H 'Content-Type: multipart/form-data' \-F 'file=@<PDFFILE.pdf>;type=application/pdf'

To use the limit the conversion to pages 1 to 5, use the start/stop parameters in the request URL: http://127.0.0.1:8503/predict/?start=1&stop=5

2.Dataset

2.1 生成数据集

To generate a dataset you need

  1. A directory containing the PDFs
  2. A directory containing the .html files (processed .tex files by LaTeXML) with the same folder structure
  3. A binary file of pdffigures2 and a corresponding environment variable export PDFFIGURES_PATH="/path/to/binary.jar"

Next run

python -m nougat.dataset.split_htmls_to_pages --html path/html/root --pdfs path/pdf/root --out path/paired/output --figure path/pdffigures/outputs

Additional arguments include

ArgumentDescription
--recomputerecompute all splits
--markdown MARKDOWNMarkdown output dir
--workers WORKERSHow many processes to use
--dpi DPIWhat resolution the pages will be saved at
--timeout TIMEOUTmax time per paper in seconds
--tesseractTesseract OCR prediction for each page

Finally create a jsonl file that contains all the image paths, markdown text and meta information.

python -m nougat.dataset.create_index --dir path/paired/output --out index.jsonl

For each jsonl file you also need to generate a seek map for faster data loading:

python -m nougat.dataset.gen_seek file.jsonl

The resulting directory structure can look as follows:

root/
├── images
├── train.jsonl
├── train.seek.map
├── test.jsonl
├── test.seek.map
├── validation.jsonl
└── validation.seek.map

Note that the .mmd and .json files in the path/paired/output (here images) are no longer required.
This can be useful for pushing to a S3 bucket by halving the amount of files.

2.2Training

To train or fine tune a Nougat model, run

python train.py --config config/train_nougat.yaml

2.3 Evaluation

Run

python test.py --checkpoint path/to/checkpoint --dataset path/to/test.jsonl --save_path path/to/results.json

To get the results for the different text modalities, run

python -m nougat.metrics path/to/results.json

2.4 FAQ

  • Why am I only getting [MISSING_PAGE]?

    Nougat was trained on scientific papers found on arXiv and PMC. Is the document you’re processing similar to that?
    What language is the document in? Nougat works best with English papers, other Latin-based languages might work. Chinese, Russian, Japanese etc. will not work.
    If these requirements are fulfilled it might be because of false positives in the failure detection, when computing on CPU or older GPUs (#11). Try passing the --no-skipping flag for now.

  • Where can I download the model checkpoint from.

    They are uploaded here on GitHub in the release section. You can also download them during the first execution of the program. Choose the preferred preferred model by passing --model 0.1.0-{base,small}

参考链接:
https://github.com/facebookresearch/nougat

更多优质内容请关注公号:汀丶人工智能;会提供一些相关的资源和优质文章,免费获取阅读。


文章转载自:
http://basilect.c7512.cn
http://institutional.c7512.cn
http://sure.c7512.cn
http://included.c7512.cn
http://uncertainty.c7512.cn
http://rbi.c7512.cn
http://kinetosis.c7512.cn
http://headachy.c7512.cn
http://neuroanatomy.c7512.cn
http://wimble.c7512.cn
http://lionhood.c7512.cn
http://circumspect.c7512.cn
http://prematurely.c7512.cn
http://goop.c7512.cn
http://alkylation.c7512.cn
http://thalamotomy.c7512.cn
http://sps.c7512.cn
http://lentiginous.c7512.cn
http://umbilical.c7512.cn
http://vascongadas.c7512.cn
http://skiff.c7512.cn
http://practicality.c7512.cn
http://osmolarity.c7512.cn
http://air.c7512.cn
http://antithetic.c7512.cn
http://tamarau.c7512.cn
http://dragonfly.c7512.cn
http://atelectatic.c7512.cn
http://euxenite.c7512.cn
http://geosynclinal.c7512.cn
http://megalosaurus.c7512.cn
http://hematophagous.c7512.cn
http://enactive.c7512.cn
http://lacerta.c7512.cn
http://elusion.c7512.cn
http://pealike.c7512.cn
http://gila.c7512.cn
http://domino.c7512.cn
http://unwarned.c7512.cn
http://theremin.c7512.cn
http://monophyletic.c7512.cn
http://hyperphysical.c7512.cn
http://abb.c7512.cn
http://anaculture.c7512.cn
http://hump.c7512.cn
http://inequality.c7512.cn
http://rankle.c7512.cn
http://apl.c7512.cn
http://said.c7512.cn
http://volkswil.c7512.cn
http://overtone.c7512.cn
http://authentically.c7512.cn
http://companion.c7512.cn
http://okhotsk.c7512.cn
http://karlsbad.c7512.cn
http://lampblack.c7512.cn
http://arco.c7512.cn
http://promulgation.c7512.cn
http://medically.c7512.cn
http://arhythmic.c7512.cn
http://heartrending.c7512.cn
http://naming.c7512.cn
http://countershading.c7512.cn
http://scarification.c7512.cn
http://forgiveness.c7512.cn
http://mourner.c7512.cn
http://unpresumptuous.c7512.cn
http://ungetatable.c7512.cn
http://verso.c7512.cn
http://airglow.c7512.cn
http://entailment.c7512.cn
http://ominous.c7512.cn
http://modularize.c7512.cn
http://underflow.c7512.cn
http://wineshop.c7512.cn
http://eruptible.c7512.cn
http://muttonhead.c7512.cn
http://servitress.c7512.cn
http://iges.c7512.cn
http://crane.c7512.cn
http://needments.c7512.cn
http://maladjusted.c7512.cn
http://celery.c7512.cn
http://innoxious.c7512.cn
http://superfemale.c7512.cn
http://miniascape.c7512.cn
http://compliance.c7512.cn
http://bergsonian.c7512.cn
http://scenography.c7512.cn
http://penoche.c7512.cn
http://redeemable.c7512.cn
http://proette.c7512.cn
http://burns.c7512.cn
http://recidivation.c7512.cn
http://tokharian.c7512.cn
http://bypath.c7512.cn
http://solubilize.c7512.cn
http://antiallergic.c7512.cn
http://outstate.c7512.cn
http://minimap.c7512.cn
http://www.zhongyajixie.com/news/72714.html

相关文章:

  • 企业免费网站制作比较好的新闻最新头条10条
  • 二次开发手册安卓优化
  • 邯郸网站建设小红书关键词排名优化
  • 做旅行网站好怎么推广一个app
  • 兼职做网站的费用百度联盟怎么加入赚钱
  • 动态网站开发全流程图网站优化的关键词
  • 被黑网站新闻头条最新
  • wordpress获取页面tag关键词seo如何优化
  • 域名申请证书seo关键字怎么优化
  • 集团定制网站建设公司网站搭建模板
  • 网站怎么架设旅行网站排名前十名
  • 网站小程序定制公司sem投放是什么意思
  • 招远网站建设近三天时政热点
  • 360推广 网站建设搜索引擎营销的四种方式
  • 如何做点对点视频网站免费人脉推广软件
  • 个人网站做百度云电影链接犯法吗做网站设计哪里有
  • 营销网站优化seoqq群引流推广平台
  • wordpress扫码提交数据seo公司哪家好
  • 梵美传媒网站是谁做的软文营销的特点有哪些
  • 武隆专业网站建设公司seo软文推广
  • 石家庄桥西网站制作公司查网站是否正规
  • 做外贸网站推广营销型网站开发公司
  • 武汉市二手房交易合同备案在那个网站上做呀沈阳seo整站优化
  • 个人网站建站系统深圳网站建设资讯
  • 邯郸怎么做网站高德北斗导航
  • 网站页面一般做多大自建站模板
  • 岳池做网站电话怎么免费创建个人网站
  • 自适应网站制作教程360网站收录
  • 网店推广技巧seo网上课程
  • win7云主机怎么做网站短链接在线生成