{ "cells": [ { "cell_type": "code", "execution_count": 60, "id": "0dbc59b3", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import os\n", "import glob\n", "from omegaconf import OmegaConf" ] }, { "cell_type": "code", "execution_count": 58, "id": "1fac2763", "metadata": {}, "outputs": [], "source": [ "test_len = {}\n", "train_len = {}\n", "files = glob.glob(\"../../AVA_src/aesthetics_image_lists/*.jpgl\")\n", "for file in files:\n", " file = file.split('/')[-1]\n", " if 'test' in file:\n", " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n", " elif 'train' in file:\n", " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n", " else:\n", " print(f\"Pass {file}\")" ] }, { "cell_type": "code", "execution_count": 61, "id": "0d089d64", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "cityscape_test.jpgl: 2500\n", "portrait_test.jpgl: 2500\n", "stilllife_test.jpgl: 2500\n", "floral_test.jpgl: 2500\n", "architecture_test.jpgl: 2500\n", "animal_test.jpgl: 2500\n", "generic_test.jpgl: 20000\n", "landscape_test.jpgl: 2500\n", "fooddrink_test.jpgl: 2500\n", "\n", "generic_ls_train.jpgl: 20000\n", "portrait_train.jpgl: 2500\n", "landscape_train.jpgl: 2500\n", "architecture_train.jpgl: 2500\n", "animal_train.jpgl: 2500\n", "cityscape_train.jpgl: 2500\n", "floral_train.jpgl: 2500\n", "stilllife_train.jpgl: 2500\n", "fooddrink_train.jpgl: 2500\n", "generic_ss_train.jpgl: 2500\n", "\n" ] } ], "source": [ "print(OmegaConf.to_yaml(test_len))\n", "print(OmegaConf.to_yaml(train_len))" ] }, { "cell_type": "code", "execution_count": 62, "id": "7e25c9f8", "metadata": {}, "outputs": [], "source": [ "test_len = {}\n", "train_len = {}\n", "files = glob.glob(\"../../AVA_src/style_image_lists/*.jpgl\")\n", "for file in files:\n", " file = file.split('/')[-1]\n", " if 'test' in file:\n", " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n", " elif 'train' in file:\n", " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n", " else:\n", " print(f\"Pass {file}\")" ] }, { "cell_type": "code", "execution_count": 63, "id": "86ff27df", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "test.jpgl: 2809\n", "\n", "train.jpgl: 11270\n", "\n" ] } ], "source": [ "print(OmegaConf.to_yaml(test_len))\n", "print(OmegaConf.to_yaml(train_len))" ] } ], "metadata": { "kernelspec": { "display_name": "huggingface", "language": "python", "name": "huggingface" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.15" }, "varInspector": { "cols": { "lenName": 16, "lenType": 16, "lenVar": 40 }, "kernels_config": { "python": { "delete_cmd_postfix": "", "delete_cmd_prefix": "del ", "library": "var_list.py", "varRefreshCmd": "print(var_dic_list())" }, "r": { "delete_cmd_postfix": ") ", "delete_cmd_prefix": "rm(", "library": "var_list.r", "varRefreshCmd": "cat(var_dic_list()) " } }, "types_to_exclude": [ "module", "function", "builtin_function_or_method", "instance", "_Feature" ], "window_display": false } }, "nbformat": 4, "nbformat_minor": 5 }