diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8f4a28a637688fa158f0524630b971f75a03f5b4 --- /dev/null +++ b/README.md @@ -0,0 +1,140 @@ +--- +license: apache-2.0 +tags: +- vision +- image-classification +- medical +- glomerulus +- pathology +- pytorch +- transformers +- vision-transformer +datasets: +- custom +metrics: +- accuracy +- f1 +model-index: +- name: vision-transformer-glomerulus-classifier + results: + - task: + type: image-classification + name: Image Classification + dataset: + name: Glomerulus Classification Dataset + type: custom + metrics: + - type: accuracy + value: 0.9491 + - type: f1 + value: 0.9493 +--- + +# Vision Transformer for Glomerulus Classification + +This model is a **Vision Transformer Large** fine-tuned for classification of renal glomerulus images, distinguishing between normal and crescentic conditions across different histological stains. + +## Model Performance + +- **Accuracy**: 0.9491 (94.91%) +- **F1-Score**: 0.9493 (94.93%) + + +## Supported Classes + +The model classifies glomeruli into **10 classes**: + +### Normal: +- `Normal_AZAN` - Normal glomerulus with Azan staining +- `Normal_HE` - Normal glomerulus with H&E staining +- `Normal_PAMS` - Normal glomerulus with PAMS staining +- `Normal_PAS` - Normal glomerulus with PAS staining +- `Normal_PICRO` - Normal glomerulus with Picro staining + +### Crescentic: +- `Crescente_AZAN` - Crescentic glomerulus with Azan staining +- `Crescente_HE` - Crescentic glomerulus with H&E staining +- `Crescente_PAMS` - Crescentic glomerulus with PAMS staining +- `Crescente_PAS` - Crescentic glomerulus with PAS staining +- `Crescente_PICRO` - Crescentic glomerulus with Picro staining + +## How to Use + +```python +from transformers import AutoImageProcessor, AutoModelForImageClassification +from PIL import Image +import torch + +# Load model and processor +model_name = "CleitonOERocha/vision-transformer-glomerulus-classifier" +processor = AutoImageProcessor.from_pretrained(model_name) +model = AutoModelForImageClassification.from_pretrained(model_name) + +# Load and process image +image = Image.open("your_image.jpg") +inputs = processor(images=image, return_tensors="pt") + +# Make prediction +with torch.no_grad(): + outputs = model(**inputs) + predictions = torch.nn.functional.softmax(outputs.logits, dim=-1) + predicted_class_id = predictions.argmax().item() + predicted_class = model.config.id2label[predicted_class_id] + confidence = predictions.max().item() + +print(f"Predicted class: {predicted_class}") +print(f"Confidence: {confidence:.4f}") +``` + +## Technical Details + +- **Architecture**: Vision Transformer Large (ViT-L/16) +- **Base Model**: google/vit-large-patch16-224-in21k +- **Input Size**: 224x224 pixels +- **Patch Size**: 16x16 +- **Parameters**: ~300M +- **Framework**: PyTorch + Transformers + +## Model Comparison + +In our benchmark: +1. **Vision Transformer Large**: 94.91% (this model) +2. **Vision Transformer Base**: 93.53% +3. **ResNet-50**: 50.58% + +## Performance by Class + +| Class | Precision | Recall | F1-Score | Support | +|-------|-----------|--------|----------|---------| +| Crescente_AZAN | 0.9500 | 0.9344 | 0.9421 | 61 | +| Crescente_HE | 0.9665 | 0.9914 | 0.9788 | 233 | +| Crescente_PAMS | 0.9737 | 0.9487 | 0.9610 | 78 | +| Crescente_PAS | 0.9607 | 0.9661 | 0.9634 | 177 | +| Crescente_PICRO | 0.7179 | 0.6364 | 0.6747 | 44 | +| Normal_AZAN | 0.8714 | 0.9683 | 0.9173 | 63 | +| Normal_HE | 0.9908 | 0.9908 | 0.9908 | 434 | +| Normal_PAMS | 0.9785 | 0.9681 | 0.9733 | 94 | +| Normal_PAS | 0.9835 | 0.8151 | 0.8914 | 146 | +| Normal_PICRO | 0.6667 | 0.9565 | 0.7857 | 46 | + +## Dataset + +The model was trained on a custom dataset of renal glomerulus images with: +- **Total images**: 2,759 images +- **Training**: 1,383 images +- **Test**: 1,376 images +- **Stains**: 5 types (AZAN, H&E, PAMS, PAS, PICRO) +- **Conditions**: Normal vs Crescentic + + +## Limitations + +- Trained specifically for renal glomeruli +- Requires histological quality images +- Does not replace professional medical diagnosis +- Performance may vary with different equipment/protocols + + +--- + +**Note**: This model is for research and educational purposes. It should not be used as the sole source for medical diagnosis. diff --git a/checkpoint-1038/config.json b/checkpoint-1038/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-1038/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-1038/model.safetensors b/checkpoint-1038/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0406ecda8ad65fb02fea8ccaa885e4bf6cea89bd --- /dev/null +++ b/checkpoint-1038/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5c7af14bfd69289e47fb95ed25213a42a35b9390c5ab388bd3ff39b13208ac8 +size 1213294072 diff --git a/checkpoint-1038/optimizer.pt b/checkpoint-1038/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..291554590400ee5a6c7d270f20b86073eec17b4a --- /dev/null +++ b/checkpoint-1038/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f18666a29d1f264a4d9e95ff8042089b3192d69d742c76432b5310ca95acb76 +size 2426823082 diff --git a/checkpoint-1038/preprocessor_config.json b/checkpoint-1038/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-1038/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-1038/rng_state.pth b/checkpoint-1038/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7ebd59cfe6140c1904ba21d0dfc1310c67b1a6b1 --- /dev/null +++ b/checkpoint-1038/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2b5691046896d865f067a1958689168fc2411c74d2f82d596bd6a636b2b141b +size 14244 diff --git a/checkpoint-1038/scaler.pt b/checkpoint-1038/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..65b8a1fa9194d9206395fe6f528c4dd5c8b5e741 --- /dev/null +++ b/checkpoint-1038/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:905cade0296cc9a60e8224f0659abd3dffd5117fba6947f896f66b7af1f0fe94 +size 988 diff --git a/checkpoint-1038/scheduler.pt b/checkpoint-1038/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..d916163039ae72cd5297e682e80ad4f9b4236464 --- /dev/null +++ b/checkpoint-1038/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:861158475a467c51c6d851a50f7818583cfa5a3dd0c7232c7434c41167ef1d18 +size 1064 diff --git a/checkpoint-1038/trainer_state.json b/checkpoint-1038/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..e95a2355f56c1d32e72ba3a9d4a90ffa999f583b --- /dev/null +++ b/checkpoint-1038/trainer_state.json @@ -0,0 +1,246 @@ +{ + "best_global_step": 519, + "best_metric": 0.9491279069767442, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-519", + "epoch": 6.0, + "eval_steps": 500, + "global_step": 1038, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + }, + { + "epoch": 1.1560693641618498, + "grad_norm": 0.14127115905284882, + "learning_rate": 4.47228144989339e-05, + "loss": 0.1697, + "step": 200 + }, + { + "epoch": 1.4450867052023122, + "grad_norm": 0.16555330157279968, + "learning_rate": 4.2057569296375274e-05, + "loss": 0.2157, + "step": 250 + }, + { + "epoch": 1.7341040462427746, + "grad_norm": 8.537938117980957, + "learning_rate": 3.9392324093816635e-05, + "loss": 0.1304, + "step": 300 + }, + { + "epoch": 2.0, + "eval_accuracy": 0.9295058139534884, + "eval_f1": 0.9299410884859952, + "eval_loss": 0.2657730281352997, + "eval_precision": 0.933292642170999, + "eval_recall": 0.9295058139534884, + "eval_runtime": 36.4406, + "eval_samples_per_second": 37.76, + "eval_steps_per_second": 4.72, + "step": 346 + }, + { + "epoch": 2.023121387283237, + "grad_norm": 0.20084255933761597, + "learning_rate": 3.6727078891258e-05, + "loss": 0.1167, + "step": 350 + }, + { + "epoch": 2.3121387283236996, + "grad_norm": 0.020546281710267067, + "learning_rate": 3.4061833688699365e-05, + "loss": 0.0301, + "step": 400 + }, + { + "epoch": 2.601156069364162, + "grad_norm": 0.38922008872032166, + "learning_rate": 3.139658848614073e-05, + "loss": 0.0882, + "step": 450 + }, + { + "epoch": 2.8901734104046244, + "grad_norm": 0.017280207946896553, + "learning_rate": 2.8731343283582092e-05, + "loss": 0.075, + "step": 500 + }, + { + "epoch": 3.0, + "eval_accuracy": 0.9491279069767442, + "eval_f1": 0.9493183237288035, + "eval_loss": 0.23121964931488037, + "eval_precision": 0.9533860558309619, + "eval_recall": 0.9491279069767442, + "eval_runtime": 36.6312, + "eval_samples_per_second": 37.564, + "eval_steps_per_second": 4.695, + "step": 519 + }, + { + "epoch": 3.179190751445087, + "grad_norm": 0.01825469546020031, + "learning_rate": 2.6066098081023454e-05, + "loss": 0.0221, + "step": 550 + }, + { + "epoch": 3.468208092485549, + "grad_norm": 0.3856063485145569, + "learning_rate": 2.345415778251599e-05, + "loss": 0.0156, + "step": 600 + }, + { + "epoch": 3.7572254335260116, + "grad_norm": 0.024169214069843292, + "learning_rate": 2.0788912579957357e-05, + "loss": 0.0384, + "step": 650 + }, + { + "epoch": 4.0, + "eval_accuracy": 0.940406976744186, + "eval_f1": 0.9397796560818565, + "eval_loss": 0.25720012187957764, + "eval_precision": 0.9423321815760374, + "eval_recall": 0.940406976744186, + "eval_runtime": 36.5035, + "eval_samples_per_second": 37.695, + "eval_steps_per_second": 4.712, + "step": 692 + }, + { + "epoch": 4.046242774566474, + "grad_norm": 0.011584389954805374, + "learning_rate": 1.812366737739872e-05, + "loss": 0.004, + "step": 700 + }, + { + "epoch": 4.335260115606936, + "grad_norm": 0.02991395629942417, + "learning_rate": 1.5458422174840087e-05, + "loss": 0.0027, + "step": 750 + }, + { + "epoch": 4.624277456647399, + "grad_norm": 0.014115595258772373, + "learning_rate": 1.2793176972281452e-05, + "loss": 0.0047, + "step": 800 + }, + { + "epoch": 4.913294797687861, + "grad_norm": 0.04197293147444725, + "learning_rate": 1.0127931769722815e-05, + "loss": 0.0017, + "step": 850 + }, + { + "epoch": 5.0, + "eval_accuracy": 0.9433139534883721, + "eval_f1": 0.9428572613065572, + "eval_loss": 0.23874278366565704, + "eval_precision": 0.9446283352762681, + "eval_recall": 0.9433139534883721, + "eval_runtime": 36.7069, + "eval_samples_per_second": 37.486, + "eval_steps_per_second": 4.686, + "step": 865 + }, + { + "epoch": 5.202312138728324, + "grad_norm": 0.01218091044574976, + "learning_rate": 7.4626865671641785e-06, + "loss": 0.0015, + "step": 900 + }, + { + "epoch": 5.491329479768786, + "grad_norm": 0.016713842749595642, + "learning_rate": 4.797441364605544e-06, + "loss": 0.0014, + "step": 950 + }, + { + "epoch": 5.780346820809249, + "grad_norm": 0.020327085629105568, + "learning_rate": 2.132196162046908e-06, + "loss": 0.0013, + "step": 1000 + }, + { + "epoch": 6.0, + "eval_accuracy": 0.9440406976744186, + "eval_f1": 0.9436455460249632, + "eval_loss": 0.23752979934215546, + "eval_precision": 0.9451293374988102, + "eval_recall": 0.9440406976744186, + "eval_runtime": 36.5702, + "eval_samples_per_second": 37.626, + "eval_steps_per_second": 4.703, + "step": 1038 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 2.2731672793183764e+18, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-1038/training_args.bin b/checkpoint-1038/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-1038/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/checkpoint-173/config.json b/checkpoint-173/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-173/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-173/model.safetensors b/checkpoint-173/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a8a2f91d553d45fe00a2cbd04cd644344a53ed50 --- /dev/null +++ b/checkpoint-173/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44a09316448c9265a8d4ddd4c6094a6e5eff6df8419c0017547096bf758fce30 +size 1213294072 diff --git a/checkpoint-173/optimizer.pt b/checkpoint-173/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..2d11ccf1e2d54027aff108aabe27af24f8c496f1 --- /dev/null +++ b/checkpoint-173/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3f34d86134f92c015ea3f80cbac02f920d6cc52cdee59567ef1e2c4f98ed6e2 +size 2426823082 diff --git a/checkpoint-173/preprocessor_config.json b/checkpoint-173/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-173/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-173/rng_state.pth b/checkpoint-173/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..ece67508ffa7f89d1f8e8b4e514d0551447e32a9 --- /dev/null +++ b/checkpoint-173/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b66e3cc7c452b707ddac5caf0aa17618afb9bc1a0333600a22c4afb353f3165 +size 14244 diff --git a/checkpoint-173/scaler.pt b/checkpoint-173/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..e06d0258b3ed2d75f059068b626c002de0930dc1 --- /dev/null +++ b/checkpoint-173/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbb3f2c7a115a02124fc26d3f3e47bfa94d4385be966a8ed53f1cc8372900c6f +size 988 diff --git a/checkpoint-173/scheduler.pt b/checkpoint-173/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b79d3066a1df402f719a965c6fc9ab3b3b697683 --- /dev/null +++ b/checkpoint-173/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdb9d2ab2c7d182d8d6cf51320dacc2dcfc9cf824d4ad4dce15b3dab81e4ea6d +size 1064 diff --git a/checkpoint-173/trainer_state.json b/checkpoint-173/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..fdbdfd4af9777443db2d1fd14a7e7eb383c98a29 --- /dev/null +++ b/checkpoint-173/trainer_state.json @@ -0,0 +1,67 @@ +{ + "best_global_step": 173, + "best_metric": 0.8997093023255814, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-173", + "epoch": 1.0, + "eval_steps": 500, + "global_step": 173, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 3.788612132197294e+17, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-173/training_args.bin b/checkpoint-173/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-173/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/checkpoint-346/config.json b/checkpoint-346/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-346/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-346/model.safetensors b/checkpoint-346/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..2bb949e8e1bff17ac9830e96a189c01d4e259031 --- /dev/null +++ b/checkpoint-346/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16baea7054116b50589edf08238b67c09bcdb44102632134ed8fa700bb57e684 +size 1213294072 diff --git a/checkpoint-346/optimizer.pt b/checkpoint-346/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..857f7de5db6bdc4ab033da299b4e5a565c128388 --- /dev/null +++ b/checkpoint-346/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49c7644f301a23d5ea9adf2429cd815d7c1094dc513fab3b98b664537e25e167 +size 2426823082 diff --git a/checkpoint-346/preprocessor_config.json b/checkpoint-346/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-346/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-346/rng_state.pth b/checkpoint-346/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..a8d90407533a766f1db1f6d04df53a298ed191c1 --- /dev/null +++ b/checkpoint-346/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f37c40ce327861a7ca13b719d3aa37510a143368b6e74358bdb14becb3899e1e +size 14244 diff --git a/checkpoint-346/scaler.pt b/checkpoint-346/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..e5b771c45e581821cd94ffeae4d5aa67c294e6f9 --- /dev/null +++ b/checkpoint-346/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64fde29b279e6b3aa49d19d3ea139f3ca54384174f4fc03279fae226afc19459 +size 988 diff --git a/checkpoint-346/scheduler.pt b/checkpoint-346/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..50da3f6dbe6f30894049b5d78f8b2d5e2211c3c7 --- /dev/null +++ b/checkpoint-346/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de6bdb1c04016adfccb0cfe9cc0657915cf966ddcd96e5bda3c28b053b71d3ad +size 1064 diff --git a/checkpoint-346/trainer_state.json b/checkpoint-346/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..5619777916dc0524e8e8e02095410fe8eabb8111 --- /dev/null +++ b/checkpoint-346/trainer_state.json @@ -0,0 +1,100 @@ +{ + "best_global_step": 346, + "best_metric": 0.9295058139534884, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-346", + "epoch": 2.0, + "eval_steps": 500, + "global_step": 346, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + }, + { + "epoch": 1.1560693641618498, + "grad_norm": 0.14127115905284882, + "learning_rate": 4.47228144989339e-05, + "loss": 0.1697, + "step": 200 + }, + { + "epoch": 1.4450867052023122, + "grad_norm": 0.16555330157279968, + "learning_rate": 4.2057569296375274e-05, + "loss": 0.2157, + "step": 250 + }, + { + "epoch": 1.7341040462427746, + "grad_norm": 8.537938117980957, + "learning_rate": 3.9392324093816635e-05, + "loss": 0.1304, + "step": 300 + }, + { + "epoch": 2.0, + "eval_accuracy": 0.9295058139534884, + "eval_f1": 0.9299410884859952, + "eval_loss": 0.2657730281352997, + "eval_precision": 0.933292642170999, + "eval_recall": 0.9295058139534884, + "eval_runtime": 36.4406, + "eval_samples_per_second": 37.76, + "eval_steps_per_second": 4.72, + "step": 346 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 7.577224264394588e+17, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-346/training_args.bin b/checkpoint-346/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-346/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/checkpoint-519/config.json b/checkpoint-519/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-519/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-519/model.safetensors b/checkpoint-519/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0f88a7ff1c31e4bd8dbab138621be096631163b6 --- /dev/null +++ b/checkpoint-519/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44212eeb777687fdcfe1fd1dec2bd3ad740139fca9dff07d872fb63ac25e11bd +size 1213294072 diff --git a/checkpoint-519/optimizer.pt b/checkpoint-519/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..4dbb9d4f43ec4a9c67dbf4cad12f081ad383238f --- /dev/null +++ b/checkpoint-519/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e527aecf26aebb4670f4dbe318652294138db25c5eed18a57186d7248e6e1ed2 +size 2426823082 diff --git a/checkpoint-519/preprocessor_config.json b/checkpoint-519/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-519/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-519/rng_state.pth b/checkpoint-519/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..53b3a4c4c904d8e7f3224f18775e25e4ac5e4436 --- /dev/null +++ b/checkpoint-519/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95b6047bd8cc6f4cdf7c46dea47edb8e542435510070c6cd1e0a7d9ccf5fd7da +size 14244 diff --git a/checkpoint-519/scaler.pt b/checkpoint-519/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b7eb44e667923475a010596b39992aaffb15b8fa --- /dev/null +++ b/checkpoint-519/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71bd1fa9715204c338ba6bcc2faef7c7b31ed26468ed0ead59bd8e738b1d85e2 +size 988 diff --git a/checkpoint-519/scheduler.pt b/checkpoint-519/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..dba462654cb00e6a89a25a181d28bc923b2379dc --- /dev/null +++ b/checkpoint-519/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7450cf42f4bceacb74b43e045d5a0d345372a37ae04be60cdca89d44a5b9d808 +size 1064 diff --git a/checkpoint-519/trainer_state.json b/checkpoint-519/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..d4d6471831db2bb46151e854216c06c1832da237 --- /dev/null +++ b/checkpoint-519/trainer_state.json @@ -0,0 +1,140 @@ +{ + "best_global_step": 519, + "best_metric": 0.9491279069767442, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-519", + "epoch": 3.0, + "eval_steps": 500, + "global_step": 519, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + }, + { + "epoch": 1.1560693641618498, + "grad_norm": 0.14127115905284882, + "learning_rate": 4.47228144989339e-05, + "loss": 0.1697, + "step": 200 + }, + { + "epoch": 1.4450867052023122, + "grad_norm": 0.16555330157279968, + "learning_rate": 4.2057569296375274e-05, + "loss": 0.2157, + "step": 250 + }, + { + "epoch": 1.7341040462427746, + "grad_norm": 8.537938117980957, + "learning_rate": 3.9392324093816635e-05, + "loss": 0.1304, + "step": 300 + }, + { + "epoch": 2.0, + "eval_accuracy": 0.9295058139534884, + "eval_f1": 0.9299410884859952, + "eval_loss": 0.2657730281352997, + "eval_precision": 0.933292642170999, + "eval_recall": 0.9295058139534884, + "eval_runtime": 36.4406, + "eval_samples_per_second": 37.76, + "eval_steps_per_second": 4.72, + "step": 346 + }, + { + "epoch": 2.023121387283237, + "grad_norm": 0.20084255933761597, + "learning_rate": 3.6727078891258e-05, + "loss": 0.1167, + "step": 350 + }, + { + "epoch": 2.3121387283236996, + "grad_norm": 0.020546281710267067, + "learning_rate": 3.4061833688699365e-05, + "loss": 0.0301, + "step": 400 + }, + { + "epoch": 2.601156069364162, + "grad_norm": 0.38922008872032166, + "learning_rate": 3.139658848614073e-05, + "loss": 0.0882, + "step": 450 + }, + { + "epoch": 2.8901734104046244, + "grad_norm": 0.017280207946896553, + "learning_rate": 2.8731343283582092e-05, + "loss": 0.075, + "step": 500 + }, + { + "epoch": 3.0, + "eval_accuracy": 0.9491279069767442, + "eval_f1": 0.9493183237288035, + "eval_loss": 0.23121964931488037, + "eval_precision": 0.9533860558309619, + "eval_recall": 0.9491279069767442, + "eval_runtime": 36.6312, + "eval_samples_per_second": 37.564, + "eval_steps_per_second": 4.695, + "step": 519 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.1365836396591882e+18, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-519/training_args.bin b/checkpoint-519/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-519/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/checkpoint-692/config.json b/checkpoint-692/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-692/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-692/model.safetensors b/checkpoint-692/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..37356aa5a28f95e17e531b370c22e1b6d7907d9d --- /dev/null +++ b/checkpoint-692/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:718a7034f83971c4cfc0da9674d4cf2d4f83fc42c49138f91da30ffab364dd42 +size 1213294072 diff --git a/checkpoint-692/optimizer.pt b/checkpoint-692/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..20cccf79e2caaa5fdb422b3ce41fedc1de6ef9f9 --- /dev/null +++ b/checkpoint-692/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d956dcce572eb9310c74fc501c364a610e0efdd7be49948a06cbe7c9bb2e042d +size 2426823082 diff --git a/checkpoint-692/preprocessor_config.json b/checkpoint-692/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-692/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-692/rng_state.pth b/checkpoint-692/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..85747b4d2343479451c52c5725a3ef89612931f5 --- /dev/null +++ b/checkpoint-692/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2768285b45b2a0c05f6f50bbb8c0287fca6f62a8cde6d1b1f02151ac72ee8dc +size 14244 diff --git a/checkpoint-692/scaler.pt b/checkpoint-692/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..1c9210571bb0a2d89563f206295391eeaaffa429 --- /dev/null +++ b/checkpoint-692/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee4ee5b4bf64535e1c4e7b8cb1191f8f02942b7b81aa4a353dd0948ce043d858 +size 988 diff --git a/checkpoint-692/scheduler.pt b/checkpoint-692/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..9448fbe3eaf925aa4168743f27ca29f3b573a7b2 --- /dev/null +++ b/checkpoint-692/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48fb7502cf263297f4d041ee8dd5df349c2bf69e1f67058a2d6f741dd32c67f1 +size 1064 diff --git a/checkpoint-692/trainer_state.json b/checkpoint-692/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..b6868d7f505d4e195f6d1c7bfdb2eeb1904e9fc5 --- /dev/null +++ b/checkpoint-692/trainer_state.json @@ -0,0 +1,173 @@ +{ + "best_global_step": 519, + "best_metric": 0.9491279069767442, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-519", + "epoch": 4.0, + "eval_steps": 500, + "global_step": 692, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + }, + { + "epoch": 1.1560693641618498, + "grad_norm": 0.14127115905284882, + "learning_rate": 4.47228144989339e-05, + "loss": 0.1697, + "step": 200 + }, + { + "epoch": 1.4450867052023122, + "grad_norm": 0.16555330157279968, + "learning_rate": 4.2057569296375274e-05, + "loss": 0.2157, + "step": 250 + }, + { + "epoch": 1.7341040462427746, + "grad_norm": 8.537938117980957, + "learning_rate": 3.9392324093816635e-05, + "loss": 0.1304, + "step": 300 + }, + { + "epoch": 2.0, + "eval_accuracy": 0.9295058139534884, + "eval_f1": 0.9299410884859952, + "eval_loss": 0.2657730281352997, + "eval_precision": 0.933292642170999, + "eval_recall": 0.9295058139534884, + "eval_runtime": 36.4406, + "eval_samples_per_second": 37.76, + "eval_steps_per_second": 4.72, + "step": 346 + }, + { + "epoch": 2.023121387283237, + "grad_norm": 0.20084255933761597, + "learning_rate": 3.6727078891258e-05, + "loss": 0.1167, + "step": 350 + }, + { + "epoch": 2.3121387283236996, + "grad_norm": 0.020546281710267067, + "learning_rate": 3.4061833688699365e-05, + "loss": 0.0301, + "step": 400 + }, + { + "epoch": 2.601156069364162, + "grad_norm": 0.38922008872032166, + "learning_rate": 3.139658848614073e-05, + "loss": 0.0882, + "step": 450 + }, + { + "epoch": 2.8901734104046244, + "grad_norm": 0.017280207946896553, + "learning_rate": 2.8731343283582092e-05, + "loss": 0.075, + "step": 500 + }, + { + "epoch": 3.0, + "eval_accuracy": 0.9491279069767442, + "eval_f1": 0.9493183237288035, + "eval_loss": 0.23121964931488037, + "eval_precision": 0.9533860558309619, + "eval_recall": 0.9491279069767442, + "eval_runtime": 36.6312, + "eval_samples_per_second": 37.564, + "eval_steps_per_second": 4.695, + "step": 519 + }, + { + "epoch": 3.179190751445087, + "grad_norm": 0.01825469546020031, + "learning_rate": 2.6066098081023454e-05, + "loss": 0.0221, + "step": 550 + }, + { + "epoch": 3.468208092485549, + "grad_norm": 0.3856063485145569, + "learning_rate": 2.345415778251599e-05, + "loss": 0.0156, + "step": 600 + }, + { + "epoch": 3.7572254335260116, + "grad_norm": 0.024169214069843292, + "learning_rate": 2.0788912579957357e-05, + "loss": 0.0384, + "step": 650 + }, + { + "epoch": 4.0, + "eval_accuracy": 0.940406976744186, + "eval_f1": 0.9397796560818565, + "eval_loss": 0.25720012187957764, + "eval_precision": 0.9423321815760374, + "eval_recall": 0.940406976744186, + "eval_runtime": 36.5035, + "eval_samples_per_second": 37.695, + "eval_steps_per_second": 4.712, + "step": 692 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.5154448528789176e+18, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-692/training_args.bin b/checkpoint-692/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-692/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/checkpoint-865/config.json b/checkpoint-865/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/checkpoint-865/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/checkpoint-865/model.safetensors b/checkpoint-865/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..464d90f1014571720a102cd636b5a977e8095889 --- /dev/null +++ b/checkpoint-865/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46f4fde21629696f8b3abb99ce0ada867fa0e54a08510b4ab421e50916b02432 +size 1213294072 diff --git a/checkpoint-865/optimizer.pt b/checkpoint-865/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..e4abd73d80c453f0293a6b433c6245e8fa993981 --- /dev/null +++ b/checkpoint-865/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62639bec4251ebaf596b4b0171292a7b6aeae2ea9b12914ceaf968c7fee2b626 +size 2426823082 diff --git a/checkpoint-865/preprocessor_config.json b/checkpoint-865/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/checkpoint-865/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/checkpoint-865/rng_state.pth b/checkpoint-865/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..20cc7222d6faef71d7ad3895c3d9d492f92b4908 --- /dev/null +++ b/checkpoint-865/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b11a10749bfb1630d95eef94125f4590e8610c579d217d1f158e71ce518d72b +size 14244 diff --git a/checkpoint-865/scaler.pt b/checkpoint-865/scaler.pt new file mode 100644 index 0000000000000000000000000000000000000000..11b19f671f267f1bd1539273bf0623028adae5ad --- /dev/null +++ b/checkpoint-865/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b93f5d881d5ad36b1384f2973e8ff1c3dea9c50a56f332079167e1059b363519 +size 988 diff --git a/checkpoint-865/scheduler.pt b/checkpoint-865/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..eeb952ffa0a08a49414960e1a23f126dffb28c4e --- /dev/null +++ b/checkpoint-865/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66911198d5617bb029a4e3c2d108793e435f9e1253437a79a4e30df7f70a6c2a +size 1064 diff --git a/checkpoint-865/trainer_state.json b/checkpoint-865/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..6e763f8fe1bc01dacf78403359f13d6a36ddac05 --- /dev/null +++ b/checkpoint-865/trainer_state.json @@ -0,0 +1,213 @@ +{ + "best_global_step": 519, + "best_metric": 0.9491279069767442, + "best_model_checkpoint": "./results_google_vit-large-patch16-224-in21k/checkpoint-519", + "epoch": 5.0, + "eval_steps": 500, + "global_step": 865, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "epoch": 0.28901734104046245, + "grad_norm": 5.746753215789795, + "learning_rate": 2.45e-05, + "loss": 1.5215, + "step": 50 + }, + { + "epoch": 0.5780346820809249, + "grad_norm": 2.093648672103882, + "learning_rate": 4.9500000000000004e-05, + "loss": 0.4825, + "step": 100 + }, + { + "epoch": 0.8670520231213873, + "grad_norm": 3.6535494327545166, + "learning_rate": 4.738805970149254e-05, + "loss": 0.3352, + "step": 150 + }, + { + "epoch": 1.0, + "eval_accuracy": 0.8997093023255814, + "eval_f1": 0.9002075736375416, + "eval_loss": 0.3576313555240631, + "eval_precision": 0.905387724540619, + "eval_recall": 0.8997093023255814, + "eval_runtime": 36.7463, + "eval_samples_per_second": 37.446, + "eval_steps_per_second": 4.681, + "step": 173 + }, + { + "epoch": 1.1560693641618498, + "grad_norm": 0.14127115905284882, + "learning_rate": 4.47228144989339e-05, + "loss": 0.1697, + "step": 200 + }, + { + "epoch": 1.4450867052023122, + "grad_norm": 0.16555330157279968, + "learning_rate": 4.2057569296375274e-05, + "loss": 0.2157, + "step": 250 + }, + { + "epoch": 1.7341040462427746, + "grad_norm": 8.537938117980957, + "learning_rate": 3.9392324093816635e-05, + "loss": 0.1304, + "step": 300 + }, + { + "epoch": 2.0, + "eval_accuracy": 0.9295058139534884, + "eval_f1": 0.9299410884859952, + "eval_loss": 0.2657730281352997, + "eval_precision": 0.933292642170999, + "eval_recall": 0.9295058139534884, + "eval_runtime": 36.4406, + "eval_samples_per_second": 37.76, + "eval_steps_per_second": 4.72, + "step": 346 + }, + { + "epoch": 2.023121387283237, + "grad_norm": 0.20084255933761597, + "learning_rate": 3.6727078891258e-05, + "loss": 0.1167, + "step": 350 + }, + { + "epoch": 2.3121387283236996, + "grad_norm": 0.020546281710267067, + "learning_rate": 3.4061833688699365e-05, + "loss": 0.0301, + "step": 400 + }, + { + "epoch": 2.601156069364162, + "grad_norm": 0.38922008872032166, + "learning_rate": 3.139658848614073e-05, + "loss": 0.0882, + "step": 450 + }, + { + "epoch": 2.8901734104046244, + "grad_norm": 0.017280207946896553, + "learning_rate": 2.8731343283582092e-05, + "loss": 0.075, + "step": 500 + }, + { + "epoch": 3.0, + "eval_accuracy": 0.9491279069767442, + "eval_f1": 0.9493183237288035, + "eval_loss": 0.23121964931488037, + "eval_precision": 0.9533860558309619, + "eval_recall": 0.9491279069767442, + "eval_runtime": 36.6312, + "eval_samples_per_second": 37.564, + "eval_steps_per_second": 4.695, + "step": 519 + }, + { + "epoch": 3.179190751445087, + "grad_norm": 0.01825469546020031, + "learning_rate": 2.6066098081023454e-05, + "loss": 0.0221, + "step": 550 + }, + { + "epoch": 3.468208092485549, + "grad_norm": 0.3856063485145569, + "learning_rate": 2.345415778251599e-05, + "loss": 0.0156, + "step": 600 + }, + { + "epoch": 3.7572254335260116, + "grad_norm": 0.024169214069843292, + "learning_rate": 2.0788912579957357e-05, + "loss": 0.0384, + "step": 650 + }, + { + "epoch": 4.0, + "eval_accuracy": 0.940406976744186, + "eval_f1": 0.9397796560818565, + "eval_loss": 0.25720012187957764, + "eval_precision": 0.9423321815760374, + "eval_recall": 0.940406976744186, + "eval_runtime": 36.5035, + "eval_samples_per_second": 37.695, + "eval_steps_per_second": 4.712, + "step": 692 + }, + { + "epoch": 4.046242774566474, + "grad_norm": 0.011584389954805374, + "learning_rate": 1.812366737739872e-05, + "loss": 0.004, + "step": 700 + }, + { + "epoch": 4.335260115606936, + "grad_norm": 0.02991395629942417, + "learning_rate": 1.5458422174840087e-05, + "loss": 0.0027, + "step": 750 + }, + { + "epoch": 4.624277456647399, + "grad_norm": 0.014115595258772373, + "learning_rate": 1.2793176972281452e-05, + "loss": 0.0047, + "step": 800 + }, + { + "epoch": 4.913294797687861, + "grad_norm": 0.04197293147444725, + "learning_rate": 1.0127931769722815e-05, + "loss": 0.0017, + "step": 850 + }, + { + "epoch": 5.0, + "eval_accuracy": 0.9433139534883721, + "eval_f1": 0.9428572613065572, + "eval_loss": 0.23874278366565704, + "eval_precision": 0.9446283352762681, + "eval_recall": 0.9433139534883721, + "eval_runtime": 36.7069, + "eval_samples_per_second": 37.486, + "eval_steps_per_second": 4.686, + "step": 865 + } + ], + "logging_steps": 50, + "max_steps": 1038, + "num_input_tokens_seen": 0, + "num_train_epochs": 6, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1.894306066098647e+18, + "train_batch_size": 8, + "trial_name": null, + "trial_params": null +} diff --git a/checkpoint-865/training_args.bin b/checkpoint-865/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..1c6385d6b422a255d80a8511c1548b08cf882e55 --- /dev/null +++ b/checkpoint-865/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd6c9c3f17910ac792342cf93f2277214bda780f04d3229697f0bcc6d445c55e +size 5432 diff --git a/config.json b/config.json new file mode 100644 index 0000000000000000000000000000000000000000..73c631a5de2d13aa03ef617fe9f473e3e8725b25 --- /dev/null +++ b/config.json @@ -0,0 +1,49 @@ +{ + "architectures": [ + "ViTForImageClassification" + ], + "attention_probs_dropout_prob": 0.0, + "encoder_stride": 16, + "hidden_act": "gelu", + "hidden_dropout_prob": 0.0, + "hidden_size": 1024, + "id2label": { + "0": "Crescente_AZAN", + "1": "Crescente_HE", + "2": "Crescente_PAMS", + "3": "Crescente_PAS", + "4": "Crescente_PICRO", + "5": "Normal_AZAN", + "6": "Normal_HE", + "7": "Normal_PAMS", + "8": "Normal_PAS", + "9": "Normal_PICRO" + }, + "image_size": 224, + "initializer_range": 0.02, + "intermediate_size": 4096, + "label2id": { + "Crescente_AZAN": 0, + "Crescente_HE": 1, + "Crescente_PAMS": 2, + "Crescente_PAS": 3, + "Crescente_PICRO": 4, + "Normal_AZAN": 5, + "Normal_HE": 6, + "Normal_PAMS": 7, + "Normal_PAS": 8, + "Normal_PICRO": 9 + }, + "layer_norm_eps": 1e-12, + "model_type": "vit", + "num_attention_heads": 16, + "num_channels": 3, + "num_hidden_layers": 24, + "patch_size": 16, + "pooler_act": "tanh", + "pooler_output_size": 1024, + "problem_type": "single_label_classification", + "qkv_bias": true, + "torch_dtype": "float32", + "transformers_version": "4.53.1" +} diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..0406ecda8ad65fb02fea8ccaa885e4bf6cea89bd --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5c7af14bfd69289e47fb95ed25213a42a35b9390c5ab388bd3ff39b13208ac8 +size 1213294072 diff --git a/preprocessor_config.json b/preprocessor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..658ffceeabf492d50f178a281293c1c3e26d0928 --- /dev/null +++ b/preprocessor_config.json @@ -0,0 +1,23 @@ +{ + "do_convert_rgb": null, + "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 + } +} diff --git a/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103199.c7edb3716d0d.5408.2 b/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103199.c7edb3716d0d.5408.2 new file mode 100644 index 0000000000000000000000000000000000000000..54ee85c12cb7dd05817a2b3c4aaf1971c07c0095 --- /dev/null +++ b/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103199.c7edb3716d0d.5408.2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74ab06fecae67bac49c2da980ab820087de0a750434a98af1f87ae1d3f48277d +size 12898 diff --git a/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103770.c7edb3716d0d.5408.3 b/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103770.c7edb3716d0d.5408.3 new file mode 100644 index 0000000000000000000000000000000000000000..0045078d52014947be63abe90d1636504ac24211 --- /dev/null +++ b/runs/Jul09_23-19-58_c7edb3716d0d/events.out.tfevents.1752103770.c7edb3716d0d.5408.3 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12f00727b13475236f2954e1810e2706159806921b88a8b7962adc400f6439b5 +size 560