Run this model with HF Jobs
Run NeuronZero/WBC-Classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/NeuronZero/WBC-Classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NeuronZero/WBC-Classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use NeuronZero/WBC-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuronZero/WBC-Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="NeuronZero/WBC-Classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("NeuronZero/WBC-Classifier") model = AutoModelForImageClassification.from_pretrained("NeuronZero/WBC-Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files37 unmodified lines38394041424344454647484950515253545556575859606137 unmodified lines### How to useHere is how to use this model to classify an image of :```pythonfrom transformers import AutoImageProcessor, ResNetForImageClassificationimport torchfrom datasets import load_datasetdataset = load_dataset("huggingface/cats-image")image = dataset["test"]["image"][0]processor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")model = ResNetForImageClassification.from_pretrained("microsoft/resnet-50")inputs = processor(image, return_tensors="pt")with torch.no_grad():logits = model(**inputs).logits# model predicts one of the 1000 ImageNet classespredicted_label = logits.argmax(-1).item()print(model.config.id2label[predicted_label])37 unmodified lines383940414243444546474849505152535455565758596037 unmodified lines### How to useHere is how to use this model to identify a neutrophil from a picture of a blood sample:```pythonfrom transformers import AutoImageProcessor, AutoModelForImageClassificationfrom PIL import Imageimport requestsprocessor = AutoImageProcessor.from_pretrained("NeuronZero/MRI-Reader")model = AutoModelForImageClassification.from_pretrained("NeuronZero/MRI-Reader")#dataset URL: https://www.kaggle.com/datasets/paultimothymooney/blood-cellsimage_url = https://storage.googleapis.com/kagglesdsdata/datasets/9232/29380/dataset-master/dataset-master/JPEGImages/BloodImage_00014.jpg?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=databundle-worker-v2%40kaggle-161607.iam.gserviceaccount.com%2F20240404%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240404T094650Z&X-Goog-Expires=345600&X-Goog-SignedHeaders=host&X-Goog-Signature=8382f4e4b34038ad9176686e9d1155a757bbc41dcf99ee8cf5b5e049fa2994a9b877de41121c3dcea9b35c67076ddd5b3ff5ec970cbf5ac8f5a3eea1149eb68b8a0e79f91084a8598cefca35be190718b402bd6f581051f436ac771c85d3239834adc933e874fa31a6db696a968676610b6da955abd6145974b535b0509d196f68c8964c3dfb2404a0ad2248d1e80eb60d463e5ea58688820b46e6fc95f6fc3919e327905c2920912b8bda2241f8bcae8c886a66513ec62a8960188387322fbd1162caea76b1ecd04c433be5fbc5cd9f9a46e1a696df3cd0981b7e6243c6e5fd041ec928a080ea2845cdbea85fbfb38ff9024627c8a148c47ae50c4154197cfcimage = Image.open(requests.get(image_url, stream=True).raw)inputs = processor(images=image, return_tensors="pt")outputs = model(**inputs)logits = outputs.logitspredicted_class_idx = logits.argmax(-1).item()print("Predicted class:", model.config.id2label[predicted_class_idx])
README.md+14-15