{"id":51605921,"url":"https://github.com/anto18671/aesthetic-rating-pretraining","last_synced_at":"2026-07-12T02:01:46.234Z","repository":{"id":362190649,"uuid":"1238122402","full_name":"anto18671/aesthetic-rating-pretraining","owner":"anto18671","description":"Train an image aesthetic scoring model on the AVA Aesthetic Visual Assessment dataset.","archived":false,"fork":false,"pushed_at":"2026-06-14T21:39:58.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T23:20:40.473Z","etag":null,"topics":["aesthetic","machine-learning","pretraining","rating"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anto18671.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-13T20:45:26.000Z","updated_at":"2026-06-14T21:40:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/anto18671/aesthetic-rating-pretraining","commit_stats":null,"previous_names":["anto18671/aesthetic-rating-pretraining"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anto18671/aesthetic-rating-pretraining","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anto18671%2Faesthetic-rating-pretraining","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anto18671%2Faesthetic-rating-pretraining/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anto18671%2Faesthetic-rating-pretraining/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anto18671%2Faesthetic-rating-pretraining/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anto18671","download_url":"https://codeload.github.com/anto18671/aesthetic-rating-pretraining/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anto18671%2Faesthetic-rating-pretraining/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35379591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aesthetic","machine-learning","pretraining","rating"],"created_at":"2026-07-12T02:01:45.664Z","updated_at":"2026-07-12T02:01:46.222Z","avatar_url":"https://github.com/anto18671.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aesthetic Rating Pretraining\n\nTrain an image aesthetic scoring model on the AVA Aesthetic Visual Assessment dataset. The training script converts AVA vote distributions into expected rating scores from 1 to 10, then fine-tunes an EfficientViT-B3 regressor with PyTorch.\n\n## Overview\n\nThis repository contains a compact training pipeline for aesthetic image rating:\n\n- Loads AVA-style image labels from `data/ground_truth_dataset.csv`\n- Reads matching images from `data/images`\n- Computes a continuous aesthetic score from the 1-10 vote histogram\n- Trains an `efficientvit_b3` model from `timm`\n- Uses Albumentations for image augmentation\n- Saves the best validation checkpoint to `checkpoints/best_model.pt`\n\n## Dataset\n\nThe project was built for the AVA Aesthetic Visual Assessment dataset:\n\nhttps://www.kaggle.com/datasets/nicolacarrassi/ava-aesthetic-visual-assessment/data\n\nExpected local structure:\n\n```text\ndata/\n  ground_truth_dataset.csv\n  images/\n    1.jpg\n    2.jpg\n    ...\n```\n\nThe CSV is expected to include an `image_num` column and vote columns named:\n\n```text\nvote_1, vote_2, vote_3, vote_4, vote_5, vote_6, vote_7, vote_8, vote_9, vote_10\n```\n\nImages that are missing from `data/images` are skipped automatically.\n\n## Installation\n\nCreate and activate a virtual environment:\n\n```bash\npython -m venv .venv\n```\n\nOn Windows:\n\n```bash\n.venv\\Scripts\\activate\n```\n\nOn macOS/Linux:\n\n```bash\nsource .venv/bin/activate\n```\n\nInstall the dependencies:\n\n```bash\npip install torch torchvision timm albumentations opencv-python tqdm\n```\n\nFor GPU training, install the PyTorch build that matches your CUDA version from the official PyTorch installation guide.\n\n## Training\n\nAfter placing the dataset under `data/`, run:\n\n```bash\npython train.py\n```\n\nThe script will:\n\n1. Load and validate local image/label pairs\n2. Split the data into train and validation sets\n3. Train for 10 epochs by default\n4. Save the best checkpoint by validation loss\n\nBest model output:\n\n```text\ncheckpoints/best_model.pt\n```\n\n## Configuration\n\nTraining settings are defined in the `Config` class inside `train.py`.\n\nDefault values:\n\n| Setting | Value |\n| --- | --- |\n| Image size | `256` |\n| Validation split | `0.1` |\n| Batch size | `40` |\n| Epochs | `10` |\n| Learning rate | `5e-5` |\n| Weight decay | `1e-4` |\n| Workers | `4` |\n| Device | CUDA if available, otherwise CPU |\n\nAdjust these values directly in `train.py` to match your hardware or experiment setup.\n\n## Model\n\nThe model uses `efficientvit_b3` from `timm` with pretrained weights. The classifier head is replaced with a small regression head that outputs one continuous aesthetic score.\n\nLoss function:\n\n```text\nMean Squared Error\n```\n\nOptimizer:\n\n```text\nAdamW\n```\n\n## Notes\n\n- The `data/` and `checkpoints/` directories are ignored by Git.\n- The dataset itself is not included in this repository.\n- The checkpoint contains the model state, optimizer state, validation loss, and epoch.\n\n## Relation to EchoLens Ratings\n\nThis project represents one of the early pretraining pipelines used during the development of the AI models behind EchoLens Ratings.\n\nThe production platform has since evolved significantly, incorporating larger datasets, more advanced architectures, and additional training and calibration stages. However, the fundamental approach remains the same: leveraging large-scale aesthetic datasets to train computer vision models capable of predicting human aesthetic preferences.\n\nThe code in this repository is a simplified research implementation released to illustrate the general methodology that contributed to the development of the EchoLens Ratings platform.\n\nLearn more about the production platform at:\n\n[EchoLens Ratings](https://echolensratings.com)\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanto18671%2Faesthetic-rating-pretraining","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanto18671%2Faesthetic-rating-pretraining","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanto18671%2Faesthetic-rating-pretraining/lists"}