Coder Social home page Coder Social logo

jwestraadt / exsclaim2.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from materialeyes/exsclaim2.0

0.0 0.0 0.0 8.71 MB

License: MIT License

Shell 0.03% JavaScript 1.00% Python 9.26% CSS 0.02% HTML 64.70% Jupyter Notebook 24.86% Dockerfile 0.12%

exsclaim2.0's Introduction

EXSCLAIM2.0: LLM-powered Automatic EXtraction, Separation, and Caption-based natural Language Annotation of IMages from scientific figures

๐Ÿค” Consider Collaboration

If you find this tool or any of its derived capabilities useful, please consider registering as a user of Center for Nanoscale Materials. We will keep you posted of latest developments, as well as opportunities for computational resources, relevant data, and collaboration. Please contact Maria Chan ([email protected]) for details.

Introduction to EXSCLAIM2.0

EXSCLAIM2.0 is a Python package combining EXSCLAIM! code with Large Language models (LLMs) that can be used for the automatic generation of datasets of labeled images from published papers. It in three main steps:

  1. [JournalScraper]: scrap journal websites, acquiring figures, captions, and metadata
  2. HTMLScraper: scrap user provided HTML files, acquiring figures, captions, and metadata
  3. CaptionDistributor: separate figure captions into the component chunks that refer to the figure's subfigures using LLMs and prompt engineering
  4. FigureSeparator: separate figures into subfigures, detect scale information, label, and type of image

Examples and tutorials

We provide several tutorials demonstrating how to use EXSCLAIM2.0:

  1. Nature_exsclaim_search: automatically scrapping data from literature and performing Named Entity Recognition (NER) on the extracted captions.
  2. HTMLScrapper: automatically scrapping data from user provided HTML files
  3. Microscopy_CLIP_retrieval: Using Microscopy_CLIP to perform image-to-image and text-to-image retrieval on our multimodal microscopy dataset.

Using EXSCLAIM

Requirements

EXSCLAIM works with Python 3.6+. We recommend using a conda or python environment to install dependencies. To use the pipeline, you need a Query on which to run the pipeline. The query can be a JSON or Python dictionary (depending on how you are accessing the pipeline) and must have the parameters(/keys/attributes) defined in the Query JSON schema and examples can be found in the query directory.

Installation with Git

To install directly from GitHub, run the following commands (it is recommended to run in a conda or python virtual environment):

pip install git+https://github.com/MaterialEyes/exsclaim2.0.git

If you run into errors, please check Troubleshooting. If they persist, please open an issue.

Using Exsclaim 2.0

from exsclaim import Pipeline
search_query = {
		...
}
results = Pipeline(search_query_json)

where search_query is either a dictionary representing a valid JSON object, or a Pathlike string pointing towards a valid JSON file, or

python -m exsclaim query {path to json file holding search query}

Using Docker Compose

To use Docker Compose to host the service, run the following commands in the base directory:

docker compose build base
docker compose build {service(s) here}
docker compose up {service(s) here}

Acknowledgements

This material is based upon work supported by Laboratory Directed Research and Development (LDRD) funding from Argonne National Laboratory, provided by the Director, Office of Science, of the U.S. Department of Energy under Contract No. DE-AC02-06CH11357

This work was performed at the Center for Nanoscale Materials, a U.S. Department of Energy Office of Science User Facility, and supported by the U.S. Department of Energy, Office of Science, under Contract No. DE-AC02-06CH11357.

We gratefully acknowledge the computing resources provided on Bebop, a high-performance computing cluster operated by the Laboratory Computing Resource Center at Argonne National Laboratory.

Citation

If you find EXSCLAIM! useful, please encourage its development by citing the following paper in your research:

Schwenker, E., Jiang, W. Spreadbury, T., Ferrier N., Cossairt, O., Chan M.K.Y., EXSCLAIM! - An automated pipeline for the construction and
labeling of materials imaging datasets from scientific literature. arXiv e-prints (2021): arXiv-2103

Bibtex

@article{schwenker2021exsclaim,
  title={EXSCLAIM! - An automated pipeline for the construction of labeled materials imaging datasets from literature},
  author={Schwenker, Eric and Jiang, Weixin and Spreadbury, Trevor and Ferrier, Nicola and Cossairt, Oliver and Chan, Maria KY},
  journal={arXiv e-prints},
  pages={arXiv--2103},
  year={2021}
}

exsclaim2.0's People

Contributors

lwashington3 avatar trevorspreadbury avatar katerinavr avatar materialeyes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.