{"id":16916523,"url":"https://github.com/ternaus/check_orientation","last_synced_at":"2025-07-04T08:37:02.819Z","repository":{"id":41554586,"uuid":"310398589","full_name":"ternaus/check_orientation","owner":"ternaus","description":"Model to check if image was rotated by 90, 180, 270 degrees.","archived":false,"fork":false,"pushed_at":"2020-11-19T00:35:41.000Z","size":52,"stargazers_count":93,"open_issues_count":2,"forks_count":17,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-28T14:26:56.342Z","etag":null,"topics":["computer-vision","deep-learning","image-classification","orientation-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ternaus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":"ternaus","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-11-05T19:32:41.000Z","updated_at":"2024-12-03T19:05:55.000Z","dependencies_parsed_at":"2022-07-08T08:03:52.948Z","dependency_job_id":null,"html_url":"https://github.com/ternaus/check_orientation","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcheck_orientation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcheck_orientation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcheck_orientation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ternaus%2Fcheck_orientation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ternaus","download_url":"https://codeload.github.com/ternaus/check_orientation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232814528,"owners_count":18580494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["computer-vision","deep-learning","image-classification","orientation-detection"],"created_at":"2024-10-13T19:28:17.511Z","updated_at":"2025-01-07T02:41:00.256Z","avatar_url":"https://github.com/ternaus.png","language":"Python","funding_links":["https://patreon.com/ternaus"],"categories":[],"sub_categories":[],"readme":"# Check orientation\n\n![](https://habrastorage.org/webt/hb/ru/ii/hbruiiuortx05lxfuokzw1skheu.jpeg)\n\nModels to check if image was rotated by 0, 90, 180, 270 degrees.\n\n## Installation\n`pip install -U check_orientation`\n\n### Example inference\n\nColab notebook with the example: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1HIGM_b8rH20N414ROZB0HN9w5p4ko2Bd?usp=sharing)\n\n## Training\n\n### Define the config.\nExample at [check_orientation/configs](check_orientation/configs)\n\n### Define the environmental variable `TRAIN_IMAGE_PATH` that points to the folder with train dataset.\nExample:\n```bash\nexport TRAIN_IMAGE_PATH=\u003cpath to the tranining folder\u003e\n```\n\n### Define the environmental variable `VAL_IMAGE_PATH` that points to the folder with validation dataset.\nExample:\n```bash\nexport VAL_IMAGE_PATH=\u003cpath to the validation folder\u003e\n```\n\n### Training\n```\npython -m check_orientation.train -c \u003cpath to config\u003e\n```\n\n### Inference\n\n```bash\npython -m torch.distributed.launch --nproc_per_node=\u003cnum_gpu\u003e check_orientation/inference.py \\\n                                   -i \u003cpath to images\u003e \\\n                                   -c \u003cpath to config\u003e \\\n                                   -w \u003cpath to weights\u003e \\\n                                   -o \u003coutput-path\u003e \\\n                                   --fp16\n```\n\n### Pre-trained models\nModels were pre-trained on the [OpenImages dataset](https://storage.googleapis.com/openimages/web/index.html).\n\n| Models        | Validation accuracy | Config file  | Weights |\n| ------------- |:--------------------:| :------------:| :------: |\n| swsl_resnext50_32x4d|0.9128| [Link](check_orientation/configs/2020-11-16.yaml)| [Link](https://github.com/ternaus/check_orientation/releases/download/v0.0.3/2020-11-16_resnext50_32x4d.zip)|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fcheck_orientation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fternaus%2Fcheck_orientation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fternaus%2Fcheck_orientation/lists"}