Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-morin committed Apr 16, 2024
1 parent 19f7271 commit dec28a2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,19 @@
poetry install
```

## Running the model
## Download the model

```
poetry run python ./mol_classifier/classifier.py infer --dir <your directory containing the images> --checkpoint <path to your checkpoint> --output <your output file name>
wget https://huggingface.co/ds4sd/MolClassifier/resolve/main/models/molclassifier_model.chpt -P ./data/models/
```

## Running the model

- Place the images to annotate in `./data/dataset/`

- Run the model
```
poetry run python ./mol_classifier/classifier.py infer --dir ./data/dataset/ --checkpoint ./data/models/molclassifier_model.chpt --output ./data/output.txt
```

- Read predictions in `./data/output.txt`
Binary file added data/dataset/US10525138B2.pdf_11_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/dataset/US10526356B2.pdf_4_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dec28a2

Please sign in to comment.