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](https://private-user-images.githubusercontent.com/58355615/269945397-96896a9e-3fbd-4293-b4e9-e0ed3147c4f4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDc3NDA1ODgsIm5iZiI6MTcwNzc0MDI4OCwicGF0aCI6Ii81ODM1NTYxNS8yNjk5NDUzOTctOTY4OTZhOWUtM2ZiZC00MjkzLWI0ZTktZTBlZDMxNDdjNGY0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjEyVDEyMTgwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkOWRiMzI1ZGZlNWYzODEyZTYxYWI0ODA2YTUzNTFkMWIxMjM4NjFhY2U2NjkxNzdlYmQ5MWQxODcwN2Y0MDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Bkq4AIlCOdkxMzuJG3rU69Giuvt6MFh1hH7jC0B4_mk)