keanteng commited on
Commit
d3a733d
·
verified ·
1 Parent(s): c5e8377

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -25
README.md CHANGED
@@ -48,29 +48,5 @@ For detailed performance metrics including precision, recall, and F1-score per c
48
 
49
  ## Usage
50
 
51
- ### With Transformers Pipeline
52
- ```python
53
- from transformers import pipeline
54
-
55
- classifier = pipeline("image-classification", model="keanteng/efficientnet-b7-breast-cancer-classification-0603-3")
56
- result = classifier("path/to/mammogram.jpg")
57
- print(result)
58
- ```
59
-
60
- ```python
61
- from transformers import AutoFeatureExtractor, AutoModelForImageClassification
62
- from PIL import Image
63
-
64
- # Load model and feature extractor
65
- model = AutoModelForImageClassification.from_pretrained("keanteng/efficientnet-b7-breast-cancer-classification-0603-3")
66
- feature_extractor = AutoFeatureExtractor.from_pretrained("keanteng/efficientnet-b7-breast-cancer-classification-0603-3")
67
- # Prepare image
68
- image = Image.open("path/to/mammogram.jpg").convert("RGB")
69
- inputs = feature_extractor(images=image, return_tensors="pt")
70
-
71
- # Get prediction
72
- outputs = model(**inputs)
73
- predicted_class_idx = outputs.logits.argmax(-1).item()
74
- print(f"Predicted class: model.config.id2label[predicted_class_idx]")
75
- ```
76
 
 
48
 
49
  ## Usage
50
 
51
+ Please check the [inference compute](https://github.com/keanteng/wqd7025/blob/main/inference/inference_comparison.ipynb).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52