Downloads · 30 days
3
3% of all-time downloads
kuri54/GynAIe-preview-B16-5k
GynAIe-preview-B16-5k is a machine learning model from kuri54. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
This model is based on the research described in the paper titled "Enhancing Cervical Cancer Cytology Screening via Artificial Intelligence Innovation". The research discusses how the application of advanced AI techni…
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
114
Public
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.bin599 MB · 99%
From the Hugging Face model README
This model is based on the research described in the paper titled "Enhancing Cervical Cancer Cytology Screening via Artificial Intelligence Innovation". The research discusses how the application of advanced AI techniques can significantly improve the accuracy and efficiency of cervical cancer screening, offering a more scalable and cost-effective solution compared to traditional methods. Specifically, this model focuses on classifying tile images from LBC cytology specimens at low magnification (x10), distinguishing between normal and abnormal categories, which is a departure from the high-magnification or single-cell focused approaches commonly used in cytology.
Repository: https://github.com/kuri54/GynAIe
License: CC-BY-NC-SA-4.0
Total Images: 5000
Normal Images: 3395
Abnormal Images: 1605
Magnification Level: x10
This model is not intended to be used in isolation. To fully utilize its capabilities and implement the techniques developed, please refer to the accompanying code available on our GitHub repository. The code provides necessary details on how to effectively use the model in your applications.
For full documentation, example scripts, and more details, visit our GitHub repository.
from PIL import Image
from transformers import CLIPModel, CLIPProcessor
device = "cuda:0" if torch.cuda.is_available() else "cpu"
model = CLIPModel.from_pretrained(kuri54/GynAIe-preview-B16-5k)
processor = CLIPProcessor.from_pretrained(kuri54/GynAIe-preview-B16-5k)
image = Image.open(path/to/image)
# normal or abnormal
text = ['a image of a normal', 'a image of a anomaly']
inputs = processor(text=text, images=image, return_tensors='pt', padding=True).to(device)
outputs = model(**inputs)
probs = outputs.logits_per_image.softmax(dim=1).cpu().detach().numpy()
predicted_class_idx = probs.argmax(-1).item()
print('Class:', labels[predicted_class_idx])
print('Score:', probs)