Run this model with HF Jobs
Run NeuronZero/CXR-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/CXR-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/CXR-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/CXR-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuronZero/CXR-Classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="NeuronZero/CXR-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/CXR-Classifier") model = AutoModelForImageClassification.from_pretrained("NeuronZero/CXR-Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (13)
- README.mdAdded+32
- checkpoint-1224/config.jsonAdded+33
- checkpoint-1224/model.safetensorsAdded+3
- checkpoint-1224/optimizer.ptAdded+3
- checkpoint-1224/rng_state.pthAdded+3
- checkpoint-1224/scheduler.ptAdded+3
- checkpoint-1224/trainer_state.jsonAdded+487
- checkpoint-1224/training_args.binAdded+3
- config.jsonAdded+33
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+36
- training_args.binAdded+3
- training_params.jsonAdded+29
1234567891011121314151617181920212223242526272829303132
---tags:- autotrain- image-classificationwidget:- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg example_title: Tiger- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg example_title: Teapot- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg example_title: Palacedatasets:- CXR-Classifier/autotrain-data---
# Model Trained Using AutoTrain
- Problem type: Image Classification
## Validation Metricsloss: 0.1180819422006607
f1: 0.9755686604886269
precision: 0.9780405405405406
recall: 0.973109243697479
auc: 0.9916270580630442
accuracy: 0.9644607843137255123456789101112131415161718192021222324252627282930313233{ "_name_or_path": "google/vit-base-patch16-224", "_num_labels": 2, "architectures": [ "ViTForImageClassification" ], "attention_probs_dropout_prob": 0.0, "encoder_stride": 16, "hidden_act": "gelu", "hidden_dropout_prob": 0.0, "hidden_size": 768, "id2label": { "0": "NORMAL", "1": "PNEUMONIA" }, "image_size": 224, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": { "NORMAL": 0, "PNEUMONIA": 1 }, "layer_norm_eps": 1e-12, "model_type": "vit", "num_attention_heads": 12, "num_channels": 3, "num_hidden_layers": 12, "patch_size": 16, "problem_type": "single_label_classification", "qkv_bias": true, "torch_dtype": "float32", "transformers_version": "4.39.0"}123version https://git-lfs.github.com/spec/v1oid sha256:80584abcc67d75cd6b1bb645f5ea036d18ddcdef533578238eb8283f6cfc5f15size 343223968123version https://git-lfs.github.com/spec/v1oid sha256:0d72869a1789240ec793fc99d9052d02e4045c77da432a56e37b2a712c0cd97csize 686563258123version https://git-lfs.github.com/spec/v1oid sha256:201277254cf0be48903edd44f2819445010c7718a2efa3c34342549b1428bddcsize 13926123version https://git-lfs.github.com/spec/v1oid sha256:d6a75058089711ac1cb44d3cfbe67bc4fc5de734191fe64c892a0c6a5988b115size 1064123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487{ "best_metric": 0.1180819422006607, "best_model_checkpoint": "CXR-Classifier/checkpoint-1224", "epoch": 3.0, "eval_steps": 500, "global_step": 1224, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.05, "grad_norm": 3.592426061630249, "learning_rate": 8.130081300813009e-06, "loss": 0.5972, "step": 20 }, { "epoch": 0.1, "grad_norm": 2.819566249847412, "learning_rate": 1.6260162601626018e-05, "loss": 0.4976, "step": 40 }, { "epoch": 0.15, "grad_norm": 5.789632320404053, "learning_rate": 2.4390243902439026e-05, "loss": 0.3321, "step": 60 }, { "epoch": 0.2, "grad_norm": 5.508607864379883, "learning_rate": 3.2520325203252037e-05, "loss": 0.415, "step": 80 }, { "epoch": 0.25, "grad_norm": 7.562315464019775, "learning_rate": 4.065040650406504e-05, "loss": 0.2412, "step": 100 }, { "epoch": 0.29, "grad_norm": 4.414723873138428, "learning_rate": 4.878048780487805e-05, "loss": 0.3456, "step": 120 }, { "epoch": 0.34, "grad_norm": 2.0423896312713623, "learning_rate": 4.922797456857402e-05, "loss": 0.2415, "step": 140 }, { "epoch": 0.39, "grad_norm": 2.041806221008301, "learning_rate": 4.83197093551317e-05, "loss": 0.3546, "step": 160 }, { "epoch": 0.44, "grad_norm": 1.6937503814697266, "learning_rate": 4.741144414168938e-05, "loss": 0.3947, "step": 180 }, { "epoch": 0.49, "grad_norm": 6.492763996124268, "learning_rate": 4.650317892824705e-05, "loss": 0.3063, "step": 200 }, { "epoch": 0.54, "grad_norm": 1.9708950519561768, "learning_rate": 4.559491371480473e-05, "loss": 0.3115, "step": 220 }, { "epoch": 0.59, "grad_norm": 12.533012390136719, "learning_rate": 4.46866485013624e-05, "loss": 0.5087, "step": 240 }, { "epoch": 0.64, "grad_norm": 8.02456283569336, "learning_rate": 4.377838328792008e-05, "loss": 0.2745, "step": 260 }, { "epoch": 0.69, "grad_norm": 1.0878229141235352, "learning_rate": 4.287011807447775e-05, "loss": 0.1905, "step": 280 }, { "epoch": 0.74, "grad_norm": 7.465769290924072, "learning_rate": 4.196185286103542e-05, "loss": 0.2509, "step": 300 }, { "epoch": 0.78, "grad_norm": 15.646003723144531, "learning_rate": 4.10535876475931e-05, "loss": 0.4353, "step": 320 }, { "epoch": 0.83, "grad_norm": 3.2481565475463867, "learning_rate": 4.014532243415077e-05, "loss": 0.3478, "step": 340 }, { "epoch": 0.88, "grad_norm": 2.395519733428955, "learning_rate": 3.923705722070845e-05, "loss": 0.2199, "step": 360 }, { "epoch": 0.93, "grad_norm": 8.089118003845215, "learning_rate": 3.832879200726612e-05, "loss": 0.2715, "step": 380 }, { "epoch": 0.98, "grad_norm": 8.150867462158203, "learning_rate": 3.74205267938238e-05, "loss": 0.2074, "step": 400 }, { "epoch": 1.0, "eval_accuracy": 0.9387254901960784, "eval_auc": 0.9766835240883684, "eval_f1": 0.957841483979764, "eval_loss": 0.2350389063358307, "eval_precision": 0.961082910321489, "eval_recall": 0.9546218487394958, "eval_runtime": 246.6561, "eval_samples_per_second": 3.308, "eval_steps_per_second": 0.207, "step": 408 }, { "epoch": 1.03, "grad_norm": 6.791078090667725, "learning_rate": 3.651226158038147e-05, "loss": 0.1235, "step": 420 }, { "epoch": 1.08, "grad_norm": 5.592333793640137, "learning_rate": 3.560399636693915e-05, "loss": 0.4199, "step": 440 }, { "epoch": 1.13, "grad_norm": 0.2713923752307892, "learning_rate": 3.469573115349682e-05, "loss": 0.3119, "step": 460 }, { "epoch": 1.18, "grad_norm": 5.907072067260742, "learning_rate": 3.37874659400545e-05, "loss": 0.2118, "step": 480 }, { "epoch": 1.23, "grad_norm": 0.9097113013267517, "learning_rate": 3.287920072661217e-05, "loss": 0.2174, "step": 500 }, { "epoch": 1.27, "grad_norm": 6.9212141036987305, "learning_rate": 3.197093551316985e-05, "loss": 0.2448, "step": 520 }, { "epoch": 1.32, "grad_norm": 6.113616466522217, "learning_rate": 3.106267029972752e-05, "loss": 0.1619, "step": 540 }, { "epoch": 1.37, "grad_norm": 0.9741531014442444, "learning_rate": 3.0154405086285197e-05, "loss": 0.3296, "step": 560 }, { "epoch": 1.42, "grad_norm": 1.604313611984253, "learning_rate": 2.924613987284287e-05, "loss": 0.1598, "step": 580 }, { "epoch": 1.47, "grad_norm": 5.160298824310303, "learning_rate": 2.8337874659400547e-05, "loss": 0.2605, "step": 600 }, { "epoch": 1.52, "grad_norm": 7.961933135986328, "learning_rate": 2.7429609445958222e-05, "loss": 0.295, "step": 620 }, { "epoch": 1.57, "grad_norm": 3.545825719833374, "learning_rate": 2.6521344232515894e-05, "loss": 0.2613, "step": 640 }, { "epoch": 1.62, "grad_norm": 0.7656643390655518, "learning_rate": 2.5613079019073572e-05, "loss": 0.1684, "step": 660 }, { "epoch": 1.67, "grad_norm": 14.269344329833984, "learning_rate": 2.4704813805631247e-05, "loss": 0.3285, "step": 680 }, { "epoch": 1.72, "grad_norm": 0.21142134070396423, "learning_rate": 2.379654859218892e-05, "loss": 0.2071, "step": 700 }, { "epoch": 1.76, "grad_norm": 1.0282666683197021, "learning_rate": 2.2888283378746594e-05, "loss": 0.2701, "step": 720 }, { "epoch": 1.81, "grad_norm": 12.365777969360352, "learning_rate": 2.198001816530427e-05, "loss": 0.1753, "step": 740 }, { "epoch": 1.86, "grad_norm": 6.909509181976318, "learning_rate": 2.1071752951861944e-05, "loss": 0.185, "step": 760 }, { "epoch": 1.91, "grad_norm": 10.059576034545898, "learning_rate": 2.016348773841962e-05, "loss": 0.1403, "step": 780 }, { "epoch": 1.96, "grad_norm": 13.194554328918457, "learning_rate": 1.9255222524977297e-05, "loss": 0.177, "step": 800 }, { "epoch": 2.0, "eval_accuracy": 0.9522058823529411, "eval_auc": 0.9864329442184113, "eval_f1": 0.967418546365915, "eval_loss": 0.15405645966529846, "eval_precision": 0.9617940199335548, "eval_recall": 0.973109243697479, "eval_runtime": 257.0506, "eval_samples_per_second": 3.174, "eval_steps_per_second": 0.198, "step": 816 }, { "epoch": 2.01, "grad_norm": 0.45505988597869873, "learning_rate": 1.834695731153497e-05, "loss": 0.1334, "step": 820 }, { "epoch": 2.06, "grad_norm": 0.5608593821525574, "learning_rate": 1.7438692098092644e-05, "loss": 0.1801, "step": 840 }, { "epoch": 2.11, "grad_norm": 1.9215396642684937, "learning_rate": 1.653042688465032e-05, "loss": 0.1397, "step": 860 }, { "epoch": 2.16, "grad_norm": 0.03459596261382103, "learning_rate": 1.5622161671207994e-05, "loss": 0.0797, "step": 880 }, { "epoch": 2.21, "grad_norm": 4.931589603424072, "learning_rate": 1.4713896457765669e-05, "loss": 0.1547, "step": 900 }, { "epoch": 2.25, "grad_norm": 12.403867721557617, "learning_rate": 1.3805631244323344e-05, "loss": 0.1008, "step": 920 }, { "epoch": 2.3, "grad_norm": 6.834578514099121, "learning_rate": 1.2897366030881017e-05, "loss": 0.3086, "step": 940 }, { "epoch": 2.35, "grad_norm": 0.12356822937726974, "learning_rate": 1.1989100817438692e-05, "loss": 0.1367, "step": 960 }, { "epoch": 2.4, "grad_norm": 0.23836758732795715, "learning_rate": 1.1080835603996367e-05, "loss": 0.1204, "step": 980 }, { "epoch": 2.45, "grad_norm": 0.645460307598114, "learning_rate": 1.0172570390554042e-05, "loss": 0.2857, "step": 1000 }, { "epoch": 2.5, "grad_norm": 6.155028820037842, "learning_rate": 9.264305177111717e-06, "loss": 0.1514, "step": 1020 }, { "epoch": 2.55, "grad_norm": 6.625197410583496, "learning_rate": 8.356039963669392e-06, "loss": 0.1973, "step": 1040 }, { "epoch": 2.6, "grad_norm": 0.4476400911808014, "learning_rate": 7.447774750227067e-06, "loss": 0.1153, "step": 1060 }, { "epoch": 2.65, "grad_norm": 11.432110786437988, "learning_rate": 6.539509536784741e-06, "loss": 0.1943, "step": 1080 }, { "epoch": 2.7, "grad_norm": 6.038093090057373, "learning_rate": 5.631244323342416e-06, "loss": 0.0998, "step": 1100 }, { "epoch": 2.75, "grad_norm": 0.24591827392578125, "learning_rate": 4.722979109900091e-06, "loss": 0.1767, "step": 1120 }, { "epoch": 2.79, "grad_norm": 3.9476640224456787, "learning_rate": 3.814713896457766e-06, "loss": 0.1798, "step": 1140 }, { "epoch": 2.84, "grad_norm": 9.382974624633789, "learning_rate": 2.9064486830154405e-06, "loss": 0.1707, "step": 1160 }, { "epoch": 2.89, "grad_norm": 0.10719335079193115, "learning_rate": 1.9981834695731155e-06, "loss": 0.2662, "step": 1180 }, { "epoch": 2.94, "grad_norm": 10.07032299041748, "learning_rate": 1.0899182561307902e-06, "loss": 0.218, "step": 1200 }, { "epoch": 2.99, "grad_norm": 17.199472427368164, "learning_rate": 1.8165304268846503e-07, "loss": 0.1692, "step": 1220 }, { "epoch": 3.0, "eval_accuracy": 0.9644607843137255, "eval_auc": 0.9916270580630442, "eval_f1": 0.9755686604886269, "eval_loss": 0.1180819422006607, "eval_precision": 0.9780405405405406, "eval_recall": 0.973109243697479, "eval_runtime": 252.4161, "eval_samples_per_second": 3.233, "eval_steps_per_second": 0.202, "step": 1224 } ], "logging_steps": 20, "max_steps": 1224, "num_input_tokens_seen": 0, "num_train_epochs": 3, "save_steps": 500, "total_flos": 7.581041343995535e+17, "train_batch_size": 8, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:0fcde71267faef3288902b885e4aa4cfb36a7b0ebfeccfd0e1505e2ba3c2e468size 4920123456789101112131415161718192021222324252627282930313233{ "_name_or_path": "google/vit-base-patch16-224", "_num_labels": 2, "architectures": [ "ViTForImageClassification" ], "attention_probs_dropout_prob": 0.0, "encoder_stride": 16, "hidden_act": "gelu", "hidden_dropout_prob": 0.0, "hidden_size": 768, "id2label": { "0": "NORMAL", "1": "PNEUMONIA" }, "image_size": 224, "initializer_range": 0.02, "intermediate_size": 3072, "label2id": { "NORMAL": 0, "PNEUMONIA": 1 }, "layer_norm_eps": 1e-12, "model_type": "vit", "num_attention_heads": 12, "num_channels": 3, "num_hidden_layers": 12, "patch_size": 16, "problem_type": "single_label_classification", "qkv_bias": true, "torch_dtype": "float32", "transformers_version": "4.39.0"}123version https://git-lfs.github.com/spec/v1oid sha256:80584abcc67d75cd6b1bb645f5ea036d18ddcdef533578238eb8283f6cfc5f15size 343223968123456789101112131415161718192021222324252627282930313233343536{ "_valid_processor_keys": [ "images", "do_resize", "size", "resample", "do_rescale", "rescale_factor", "do_normalize", "image_mean", "image_std", "return_tensors", "data_format", "input_data_format" ], "do_normalize": true, "do_rescale": true, "do_resize": true, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "ViTImageProcessor", "image_std": [ 0.5, 0.5, 0.5 ], "resample": 2, "rescale_factor": 0.00392156862745098, "size": { "height": 224, "width": 224 }}123version https://git-lfs.github.com/spec/v1oid sha256:0fcde71267faef3288902b885e4aa4cfb36a7b0ebfeccfd0e1505e2ba3c2e468size 49201234567891011121314151617181920212223242526272829{ "data_path": "CXR-Classifier/autotrain-data", "model": "google/vit-base-patch16-224", "username": "NeuronZero", "lr": 5e-05, "epochs": 3, "batch_size": 8, "warmup_ratio": 0.1, "gradient_accumulation": 1, "optimizer": "adamw_torch", "scheduler": "linear", "weight_decay": 0.0, "max_grad_norm": 1.0, "seed": 42, "train_split": "train", "valid_split": "validation", "logging_steps": -1, "project_name": "CXR-Classifier", "auto_find_batch_size": false, "mixed_precision": "fp8", "save_total_limit": 1, "save_strategy": "epoch", "push_to_hub": true, "repo_id": "NeuronZero/CXR-Classifier", "evaluation_strategy": "epoch", "image_column": "autotrain_image", "target_column": "autotrain_label", "log": "none"}README.mdAdded+32
checkpoint-1224/config.jsonAdded+33
checkpoint-1224/model.safetensorsAdded+3
checkpoint-1224/optimizer.ptAdded+3
checkpoint-1224/rng_state.pthAdded+3
checkpoint-1224/scheduler.ptAdded+3
checkpoint-1224/trainer_state.jsonAdded+487
checkpoint-1224/training_args.binAdded+3
config.jsonAdded+33
model.safetensorsAdded+3
preprocessor_config.jsonAdded+36
training_args.binAdded+3
training_params.jsonAdded+29