Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accuracy issues #13

Open
seefun opened this issue Feb 17, 2025 · 1 comment
Open

Accuracy issues #13

seefun opened this issue Feb 17, 2025 · 1 comment

Comments

@seefun
Copy link

seefun commented Feb 17, 2025

I conducted inference on USPTO, but I couldn't obtain the metrics in the paper. Only about 64% accuracy can be obtained (91.5% in papar).

Image

Can you provide MolGrapher's inference results (SMILES) from USPTO dataset for comparison?

@lucas-morin
Copy link
Collaborator

Hello @seefun,

To evaluate MolGrapher, did you use the evaluation script?
The method used to compute accuracy is defined here. The evaluation is done without stereo-chemistry, maybe that is why you have different scores? (By default, stereo-chemistry is removed from MolGrapher's predictions.)

To get MolGrapher's SMILES on USPTO, you can run:

python3 molgrapher/scripts/evaluate/evaluate_molecular_recognition.py

Before running it:

  1. Edit the config file to:
{   
    "experiment_name": "exp-default", 
    "batch_size": 4,
    "nb_workers": 4,
    "num_processes_mp": 2,
    "num_threads_pytorch": 10,
    "image_size": [3, 1024, 1024],
    "nb_atoms_classes": 182,
    "nb_bonds_classes": 6,
    "nb_sample": 1000,
    "nb_duplicates": 1,
    "nb_sample_fine-tuning": 10000,
    "nb_sample_benchmarks": [10000],
    "training_dataset_fine-tuning": "uspto-10k",
    "training_dataset": "molgrapher-synthetic",
    "benchmarks": ["uspto"],
    "on_fly": false
}
  1. Add your code to convert the predicted molecules to SMILES and save them. For example, you can do it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants