GithubHelp home page GithubHelp logo

dmw51 / reactiondataextractor2 Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 4.0 92.23 MB

This repo contains ReactionDataExtractor v.2 - software toolkit for extraction of information from chemical reaction schemes

Home Page: http://www.reactiondataextractor.org

License: MIT License

Python 100.00%

reactiondataextractor2's People

Contributors

dmw51 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

reactiondataextractor2's Issues

stuck at tensorflow-cpu==2.7.1

I am running a macbook pro with Apple M2 pro chip. I can get Decimer to work but installation of the reactiondataextractor fails with

ERROR: Could not find a version that satisfies the requirement tensorflow-cpu==2.7.1 (from decimer) (from versions: none)
ERROR: No matching distribution found for tensorflow-cpu==2.7.1

is the software supposed to run with macos?

TypeError: unhashable type: 'numpy.ndarray'

Deat @dmw51
I tried to run the code according to the provided instructions in the conda environment with Python 3.8.17 on osx-arm64:

python reactiondataextractor/extract.py --path ../Benchmark/310002189885.png

and I encountered the following Error. Here is the output in Terminal:

**TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).

For more information see: tensorflow/addons#2807

warnings.warn(
number of potential arrow crops: 64
number of potential arrow crops: 34
Traceback (most recent call last):
File "reactiondataextractor/extract.py", line 42, in
extractor.extract()
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/extractors/scheme_extractor.py", line 64, in extract
scheme = self.extract_from_image(self.path)
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/extractors/scheme_extractor.py", line 119, in extract_from_image
smiles_extractor.extract()
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/extractors/smiles.py", line 28, in extract
self.recognise(diag)
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/extractors/smiles.py", line 42, in recognise
predicted_SMILES = self.recogniser.detokenize_output(predicted_tokens)
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/recognise.py", line 66, in detokenize_output
outputs = [tokenizer.index_word[i] for i in predicted_array[0].numpy()]
File "ReactionDataExtractor/reactiondataextractor2/reactiondataextractor/recognise.py", line 66, in
outputs = [tokenizer.index_word[i] for i in predicted_array[0].numpy()]
TypeError: unhashable type: 'numpy.ndarray'**

Attached please find the image that I tried to recognize, however for other images the problem persists regardless image format or quality.
310002189885

Is it possible to run in windows OS

Hello, dmw51

I want to run ReactionDataExtrator2 on my machine(Windows 10).
Installing pyheif steps, I faced an issue.
So, I proceeded to manually install pyheif from github.
But, I met another error as below.

====================================================================================
Collecting pyheif
Using cached pyheif-0.7.1.tar.gz (22 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: cffi>=1.0.0 in c:\users\sjlee\miniconda3\envs\rde2\lib\site-packages (from pyheif) (1.16.0)
Requirement already satisfied: pycparser in c:\users\sjlee\miniconda3\envs\rde2\lib\site-packages (from cffi>=1.0.0->pyheif) (2.21)
Building wheels for collected packages: pyheif
Building wheel for pyheif (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pyheif (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [25 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\pyheif
copying pyheif\constants.py -> build\lib.win-amd64-cpython-38\pyheif
copying pyheif\error.py -> build\lib.win-amd64-cpython-38\pyheif
copying pyheif\reader.py -> build\lib.win-amd64-cpython-38\pyheif
copying pyheif\writer.py -> build\lib.win-amd64-cpython-38\pyheif
copying pyheif_init_.py -> build\lib.win-amd64-cpython-38\pyheif
creating build\lib.win-amd64-cpython-38\pyheif\data
copying pyheif\data\version.txt -> build\lib.win-amd64-cpython-38\pyheif\data
running build_ext
generating cffi module 'build\temp.win-amd64-cpython-38\Release\_libheif_cffi.c'
creating build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release
building '_libheif_cffi' extension
creating build\temp.win-amd64-cpython-38\Release\build
creating build\temp.win-amd64-cpython-38\Release\build\temp.win-amd64-cpython-38
creating build\temp.win-amd64-cpython-38\Release\build\temp.win-amd64-cpython-38\Release
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -I/usr/local/include -I/usr/include -I/opt/local/include -IC:\Users\sjlee\miniconda3\envs\rde2\include -IC:\Users\sjlee\miniconda3\envs\rde2\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" /Tcbuild\temp.win-amd64-cpython-38\Release_libheif_cffi.c /Fobuild\temp.win-amd64-cpython-38\Release\build\temp.win-amd64-cpython-38\Release_libheif_cffi.obj
_libheif_cffi.c
build\temp.win-amd64-cpython-38\Release_libheif_cffi.c(570): fatal error C1083: Cannot open include file: 'libheif/heif.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyheif

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.