Myosotis-Researches 0.1.5__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7/Myosotis_Researches.egg-info}/PKG-INFO +1 -1
  2. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/Myosotis_Researches.egg-info/SOURCES.txt +1 -0
  3. {myosotis_researches-0.1.5/Myosotis_Researches.egg-info → myosotis_researches-0.1.7}/PKG-INFO +1 -1
  4. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/__init__.py +1 -9
  5. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/__init__.py +1 -9
  6. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/__init__.py +2 -0
  7. myosotis_researches-0.1.7/myosotis_researches/CcGAN/utils/opts.py +89 -0
  8. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/setup.py +1 -1
  9. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/LICENSE +0 -0
  10. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/Myosotis_Researches.egg-info/dependency_links.txt +0 -0
  11. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/Myosotis_Researches.egg-info/top_level.txt +0 -0
  12. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/README.md +0 -0
  13. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/__init__.py +0 -0
  14. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/internal/__init__.py +0 -0
  15. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/internal/install_datasets.py +0 -0
  16. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/internal/show_datasets.py +0 -0
  17. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/internal/uninstall_datasets.py +0 -0
  18. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/CcGAN_SAGAN.py +0 -0
  19. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/ResNet_class_eval.py +0 -0
  20. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/ResNet_embed.py +0 -0
  21. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/ResNet_regre_eval.py +0 -0
  22. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/autoencoder.py +0 -0
  23. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/cGAN_SAGAN.py +0 -0
  24. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_128/cGAN_concat_SAGAN.py +0 -0
  25. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/CcGAN_SAGAN.py +0 -0
  26. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/ResNet_class_eval.py +0 -0
  27. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/ResNet_embed.py +0 -0
  28. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/ResNet_regre_eval.py +0 -0
  29. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/autoencoder.py +0 -0
  30. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/cGAN_SAGAN.py +0 -0
  31. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/models_256/cGAN_concat_SAGAN.py +0 -0
  32. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/DiffAugment_pytorch.py +0 -0
  33. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/__init__.py +0 -0
  34. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/eval_metrics.py +0 -0
  35. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/opts.py +0 -0
  36. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/pretrain_AE.py +0 -0
  37. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/pretrain_CNN_class.py +0 -0
  38. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/pretrain_CNN_regre.py +0 -0
  39. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/train_ccgan.py +0 -0
  40. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/train_cgan.py +0 -0
  41. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/train_cgan_concat.py +0 -0
  42. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/train_net_for_label_embed.py +0 -0
  43. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128/utils.py +0 -0
  44. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/DiffAugment_pytorch.py +0 -0
  45. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/__init__.py +0 -0
  46. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/eval_metrics.py +0 -0
  47. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/opts.py +0 -0
  48. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/pretrain_AE.py +0 -0
  49. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_class.py +0 -0
  50. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/pretrain_CNN_regre.py +0 -0
  51. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/train_ccgan.py +0 -0
  52. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/train_cgan.py +0 -0
  53. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/train_cgan_concat.py +0 -0
  54. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/train_net_for_label_embed.py +0 -0
  55. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/train_128_output_10/utils.py +0 -0
  56. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/IMGs_dataset.py +0 -0
  57. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/SimpleProgressBar.py +0 -0
  58. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/concat_image.py +0 -0
  59. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/make_h5.py +0 -0
  60. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/print_hdf5.py +0 -0
  61. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/CcGAN/utils/train.py +0 -0
  62. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/myosotis_researches/__init__.py +0 -0
  63. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/pyproject.toml +0 -0
  64. {myosotis_researches-0.1.5 → myosotis_researches-0.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Myosotis-Researches
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: A repository for storing my progress of researches.
5
5
  Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
6
6
  Author: Zeyu Xie
@@ -57,5 +57,6 @@ myosotis_researches/CcGAN/utils/SimpleProgressBar.py
57
57
  myosotis_researches/CcGAN/utils/__init__.py
58
58
  myosotis_researches/CcGAN/utils/concat_image.py
59
59
  myosotis_researches/CcGAN/utils/make_h5.py
60
+ myosotis_researches/CcGAN/utils/opts.py
60
61
  myosotis_researches/CcGAN/utils/print_hdf5.py
61
62
  myosotis_researches/CcGAN/utils/train.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Myosotis-Researches
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: A repository for storing my progress of researches.
5
5
  Home-page: https://github.com/Zeyu-Xie/Myosotis-Researches
6
6
  Author: Zeyu Xie
@@ -4,12 +4,4 @@ from .cGAN_concat_SAGAN import cGAN_concat_SAGAN_Generator, cGAN_concat_SAGAN_Di
4
4
  from .CcGAN_SAGAN import CcGAN_SAGAN_Generator, CcGAN_SAGAN_Discriminator
5
5
  from .ResNet_embed import ResNet18_embed, ResNet34_embed, ResNet50_embed, model_y2h
6
6
  from .ResNet_regre_eval import ResNet34_regre_eval
7
- from .ResNet_class_eval import ResNet34_class_eval
8
-
9
- __all__ = [
10
- "cGAN_SAGAN_Generator", "cGAN_SAGAN_Discriminator",
11
- "cGAN_concat_SAGAN_Generator", "cGAN_concat_SAGAN_Discriminator",
12
- "CcGAN_SAGAN_Generator", "CcGAN_SAGAN_Discriminator",
13
- "ResNet18_embed", "ResNet34_embed", "ResNet50_embed", "model_y2h",
14
- "ResNet34_regre_eval", "ResNet34_class_eval"
15
- ]
7
+ from .ResNet_class_eval import ResNet34_class_eval
@@ -4,12 +4,4 @@ from .cGAN_concat_SAGAN import cGAN_concat_SAGAN_Generator, cGAN_concat_SAGAN_Di
4
4
  from .CcGAN_SAGAN import CcGAN_SAGAN_Generator, CcGAN_SAGAN_Discriminator
5
5
  from .ResNet_embed import ResNet18_embed, ResNet34_embed, ResNet50_embed, model_y2h
6
6
  from .ResNet_regre_eval import ResNet34_regre_eval
7
- from .ResNet_class_eval import ResNet34_class_eval
8
-
9
- __all__ = [
10
- "cGAN_SAGAN_Generator", "cGAN_SAGAN_Discriminator",
11
- "cGAN_concat_SAGAN_Generator", "cGAN_concat_SAGAN_Discriminator",
12
- "CcGAN_SAGAN_Generator", "CcGAN_SAGAN_Discriminator",
13
- "ResNet18_embed", "ResNet34_embed", "ResNet50_embed", "model_y2h",
14
- "ResNet34_regre_eval", "ResNet34_class_eval"
15
- ]
7
+ from .ResNet_class_eval import ResNet34_class_eval
@@ -4,6 +4,7 @@ from .make_h5 import make_h5
4
4
  from .SimpleProgressBar import SimpleProgressBar
5
5
  from .IMGs_dataset import IMGs_dataset
6
6
  from .train import PlotLoss, compute_entropy, predict_class_labels
7
+ from .opts import parse_opts
7
8
 
8
9
  __all__ = [
9
10
  "print_hdf5",
@@ -14,4 +15,5 @@ __all__ = [
14
15
  "PlotLoss",
15
16
  "compute_entropy",
16
17
  "predict_class_labels",
18
+ "parse_opts"
17
19
  ]
@@ -0,0 +1,89 @@
1
+ import argparse
2
+
3
+ def parse_opts():
4
+ parser = argparse.ArgumentParser()
5
+
6
+ ''' Overall Settings '''
7
+ parser.add_argument('--data_path', type=str, default='')
8
+ parser.add_argument('--output_dir', type=str, default='')
9
+ parser.add_argument('--eval_ckpt_path', type=str, default='')
10
+ parser.add_argument('--seed', type=int, default=2021, metavar='S', help='random seed (default: 2020)')
11
+ parser.add_argument('--num_workers', type=int, default=0)
12
+
13
+
14
+ ''' Dataset '''
15
+ ## Data split: Ra is split into a train set (the last decimal of the degree is odd) and a test set (the last decimal of the degree is even); the unique labels in two sets do not overlap.
16
+ parser.add_argument('--data_split', type=str, default='train',
17
+ choices=['all', 'train'])
18
+ parser.add_argument('--min_label', type=float, default=0.0)
19
+ parser.add_argument('--max_label', type=float, default=90.0)
20
+ parser.add_argument('--num_channels', type=int, default=3, metavar='N')
21
+ parser.add_argument('--img_size', type=int, default=128, metavar='N')
22
+ parser.add_argument('--max_num_img_per_label', type=int, default=50, metavar='N')
23
+ parser.add_argument('--max_num_img_per_label_after_replica', type=int, default=0, metavar='N')
24
+ parser.add_argument('--show_real_imgs', action='store_true', default=False)
25
+ parser.add_argument('--visualize_fake_images', action='store_true', default=False)
26
+
27
+
28
+ ''' GAN settings '''
29
+ parser.add_argument('--GAN', type=str, default='CcGAN', choices=['cGAN', 'cGAN-concat', 'CcGAN'])
30
+ parser.add_argument('--GAN_arch', type=str, default='SAGAN', choices=['SAGAN'])
31
+
32
+ # label embedding setting
33
+ parser.add_argument('--net_embed', type=str, default='ResNet34_embed') #ResNetXX_emebed
34
+ parser.add_argument('--epoch_cnn_embed', type=int, default=200) #epoch of cnn training for label embedding
35
+ parser.add_argument('--resumeepoch_cnn_embed', type=int, default=0) #epoch of cnn training for label embedding
36
+ parser.add_argument('--epoch_net_y2h', type=int, default=500)
37
+ parser.add_argument('--dim_embed', type=int, default=128) #dimension of the embedding space
38
+ parser.add_argument('--batch_size_embed', type=int, default=256, metavar='N')
39
+
40
+ parser.add_argument('--loss_type_gan', type=str, default='hinge')
41
+ parser.add_argument('--niters_gan', type=int, default=10000, help='number of iterations')
42
+ parser.add_argument('--resume_niters_gan', type=int, default=0)
43
+ parser.add_argument('--save_niters_freq', type=int, default=2000, help='frequency of saving checkpoints')
44
+ parser.add_argument('--lr_g_gan', type=float, default=1e-4, help='learning rate for generator')
45
+ parser.add_argument('--lr_d_gan', type=float, default=1e-4, help='learning rate for discriminator')
46
+ parser.add_argument('--dim_gan', type=int, default=128, help='Latent dimension of GAN')
47
+ parser.add_argument('--batch_size_disc', type=int, default=64)
48
+ parser.add_argument('--batch_size_gene', type=int, default=64)
49
+ parser.add_argument('--num_D_steps', type=int, default=4, help='number of Ds updates in one iteration')
50
+ parser.add_argument('--cGAN_num_classes', type=int, default=20, metavar='N') #bin label into cGAN_num_classes
51
+ parser.add_argument('--visualize_freq', type=int, default=2000, help='frequency of visualization')
52
+
53
+ parser.add_argument('--kernel_sigma', type=float, default=-1.0,
54
+ help='If kernel_sigma<0, then use rule-of-thumb formula to compute the sigma.')
55
+ parser.add_argument('--threshold_type', type=str, default='hard', choices=['soft', 'hard'])
56
+ parser.add_argument('--kappa', type=float, default=-1)
57
+ parser.add_argument('--nonzero_soft_weight_threshold', type=float, default=1e-3,
58
+ help='threshold for determining nonzero weights for SVDL; we neglect images with too small weights')
59
+
60
+ # DiffAugment setting
61
+ parser.add_argument('--gan_DiffAugment', action='store_true', default=False)
62
+ parser.add_argument('--gan_DiffAugment_policy', type=str, default='color,translation,cutout')
63
+
64
+
65
+ # evaluation setting
66
+ '''
67
+ Four evaluation modes:
68
+ Mode 1: eval on unique labels used for GAN training;
69
+ Mode 2. eval on all unique labels in the dataset and when computing FID use all real images in the dataset;
70
+ Mode 3. eval on all unique labels in the dataset and when computing FID only use real images for GAN training in the dataset (to test SFID's effectiveness on unseen labels);
71
+ Mode 4. eval on a interval [min_label, max_label] with num_eval_labels labels.
72
+ '''
73
+ parser.add_argument('--eval_mode', type=int, default=2)
74
+ parser.add_argument('--num_eval_labels', type=int, default=-1)
75
+ parser.add_argument('--samp_batch_size', type=int, default=200)
76
+ parser.add_argument('--nfake_per_label', type=int, default=200)
77
+ parser.add_argument('--nreal_per_label', type=int, default=-1)
78
+ parser.add_argument('--comp_FID', action='store_true', default=False)
79
+ parser.add_argument('--epoch_FID_CNN', type=int, default=200)
80
+ parser.add_argument('--FID_radius', type=float, default=0)
81
+ parser.add_argument('--FID_num_centers', type=int, default=-1)
82
+ parser.add_argument('--dump_fake_for_NIQE', action='store_true', default=False,
83
+ help='Dump fake images for computing NIQE')
84
+
85
+ args = parser.parse_args()
86
+
87
+ return args
88
+
89
+ __all__ = ["parse_opts"]
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="Myosotis-Researches",
5
- version="0.1.5",
5
+ version="0.1.7",
6
6
  description="A repository for storing my progress of researches.",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",