{"id":16388248,"url":"https://github.com/tlesort/generative_continual_learning","last_synced_at":"2025-03-21T02:31:28.139Z","repository":{"id":78327669,"uuid":"154284682","full_name":"TLESORT/Generative_Continual_Learning","owner":"TLESORT","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-22T13:51:52.000Z","size":560,"stargazers_count":53,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T19:52:20.199Z","etag":null,"topics":["continual-learning","continuous-learning","generative-adversarial-network","generative-models","incremental-learning","lifelong-learning","pytorch","variational-autoencoder"],"latest_commit_sha":null,"homepage":null,"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/TLESORT.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}},"created_at":"2018-10-23T07:42:59.000Z","updated_at":"2024-01-04T16:27:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d3c76fb-744f-4e0e-8acf-b7044ad6423b","html_url":"https://github.com/TLESORT/Generative_Continual_Learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLESORT%2FGenerative_Continual_Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLESORT%2FGenerative_Continual_Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLESORT%2FGenerative_Continual_Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLESORT%2FGenerative_Continual_Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TLESORT","download_url":"https://codeload.github.com/TLESORT/Generative_Continual_Learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244725553,"owners_count":20499628,"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":["continual-learning","continuous-learning","generative-adversarial-network","generative-models","incremental-learning","lifelong-learning","pytorch","variational-autoencoder"],"created_at":"2024-10-11T04:28:41.080Z","updated_at":"2025-03-21T02:31:28.126Z","avatar_url":"https://github.com/TLESORT.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generative Models from the perspective of Continual Learning\n*Timothée Lesort, Hugo Caselles-Dupré, Michael Garcia-Ortiz, Andrei Stoian, David Filliat*; **IJCNN 2019, Budapest**\n\n## Abstract\n\nWhich generative model is the most suitable for Continual Learning? This paper aims at evaluating and comparing generative models on disjoint sequential image generation tasks.\u003cbr /\u003e\nWe investigate how several models learn and forget, considering various strategies: rehearsal, regularization, generative replay and fine-tuning. We used two quantitative metrics to estimate the generation quality and memory ability. We experiment with sequential tasks on three commonly used benchmarks for Continual Learning (MNIST, Fashion MNIST and CIFAR10).\u003cbr /\u003e\nWe found that among all models, the original GAN performs best and among Continual Learning strategies, generative replay outperforms all other methods. Even if we found satisfactory combinations on MNIST and Fashion MNIST, training generative models sequentially on CIFAR10 is particularly instable, and remains a challenge.\u003cbr /\u003e\n\n\u003cimg src=\"./Archives/Images/task_explained.png\" width=\"800\" alt=\"Sequence of Task\"\u003e\nExample of generative tasks sequence and generation capability to reach.\n\n\n### Citing the Project\n\n```Array.\u003cstring\u003e\n@inproceedings{lesort2019generative,\n  title={Generative models from the perspective of continual learning},\n  author={Lesort, Timoth{\\'e}e and Caselles-Dupr{\\'e}, Hugo and Garcia-Ortiz, Michael and Stoian, Andrei and Filliat, David},\n  booktitle={2019 International Joint Conference on Neural Networks (IJCNN)},\n  pages={1--8},\n  year={2019},\n  organization={IEEE}\n}\n```\n## Installation\n\n### Clone Repos\n\n```bash\ngit clone https://github.com/TLESORT/Generation_Incremental.git\n```\n\n### Create Set-up\n\n#### Manual\n\n```bash\npytorch 0.4\ntorchvision 0.2.1\nimageio 2.2.0\ntqdm 4.19.5\n```\n\n#### Conda environmnet\n\n```bash\nconda env create -f environment.yml\nsource activate py36\n```\n\n#### Docker environmnet\n\nTODO\n\n## Experiments Done\n\n#### Dataset\n\n* MNIST\n* Fashion MNIST\n\n\n#### Generative Models\n\n* GAN\n* CGAN\n* WGAN\n* WGAN_GP\n* VAE\n* CVAE\n\n#### Task\n\n* Disjoint tasks -\u003e 10 tasks\n\n\n#### To Add\n\n* Cifar10\n\n## Run experiments\n\n\n```bash\n\ncd Scripts\n./generate_test.sh\n./test_todo.sh\n```\n\n\nNB : Test todo will contains all bash commands to run since it may takes some days to run them all you can choose one of them manually and run it in the main repository\nManual Example of commands for training and evaluating *Generative_replay* with *GAN* on Mnist :\n\nGenerate Data\n```bash\ncd ./Data\n#For the expert\npython main_data.py --task disjoint --dataset mnist --n_tasks 1 --dir ../Archives\n#For the models to train\npython main_data.py --task disjoint --dataset mnist --n_tasks 10 --dir ../Archives\n#For Upperbound and FID\npython main_data.py --task disjoint --upperbound True --dataset mnist --n_tasks 10 --dir ../Archives\n\n# Go back to main repo\ncd ..\n```\n\nTrain Expert to compute later FID\n```bash\npython main.py --context Classification --task_type disjoint --method Baseline --dataset mnist --epochs 50 --epoch_Review 50 --num_task 1 --seed 0 --dir ./Archives\n```\n\nTrain Generator\n```bash\npython main.py --context Generation --task_type disjoint --method Generative_Replay --dataset mnist --epochs 50 --num_task 10 --gan_type GAN --train_G True --seed 0 --dir ./Archives\n```\n\nReview Generator with Fitting Capacity\n```bash\npython main.py --context Generation --task_type disjoint --method Generative_Replay --dataset mnist --epochs 50 --num_task 10 --gan_type GAN --Fitting_capacity True --seed 0 --dir ./Archives\n```\n\nReview Generator with FID\n```bash\npython main.py --context Generation --task_type disjoint --method Generative_Replay --dataset mnist --epochs 50 --num_task 10 --gan_type GAN --FID True --seed 0 --dir ./Archives\n```\n\n## print figures\n\nGo to the main repository\n\nPlot Fitting Capacity\n```bash\npython print_figures.py --fitting_capacity True\n```\n\nPlot FID\n```bash\npython print_figures.py --FID True\n```\n\n\n\u003ctable width=\"500\" cellpadding=\"5\"\u003e\n\u003ctr\u003e\n  \n  \u003ctd align=\"center\" valign=\"center\"\u003e\n    \u003cimg src=\"./Archives/Images/mnist_disjoint_GAN_Fitting_Capacity.png\" width=\"400\" alt=\"Fitting capacity : GAN MNIST\"\u003e\n  \u003cbr /\u003e\n  Fitting capacity at each task : GAN MNIST\n  \u003c/td\u003e\n  \u003ctd align=\"center\" valign=\"center\"\u003e\n    \u003cimg src=\"./Archives/Images/mnist_disjoint_GAN_FID.png\" width=\"400\" alt=\"FID : GAN MNIST\"\u003e\n  \u003cbr /\u003e\n  Fashion-Mnist at each task results.\n  \u003c/td\u003e\n\n\u003c/tr\u003e\n\n\u003c/table\u003e\n\n## Plot Samples\n\n\u003cimg src=\"./Archives/Images/samples_ap_mnist.png\" width=\"800\" alt=\"Samples MNIST\"\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlesort%2Fgenerative_continual_learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlesort%2Fgenerative_continual_learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlesort%2Fgenerative_continual_learning/lists"}