add deep dream code, still working on

This commit is contained in:
Marina von Steinkirch 2016-07-31 21:04:57 -07:00
parent 66badb165d
commit f4cd774c71
14 changed files with 1277 additions and 0 deletions

View file

@ -0,0 +1 @@
echo aaa

View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
""" Create dream """
IMAGE_TO_DREAM = "saturn.jpg"
IMAGE_TO_DREAM_OUTPUT = "dream.jpg"
bc = BatCountry(IMAGE_TO_DREAM)
image = bc.dream(np.float32(Image.open())
bc.cleanup()
result = Image.fromarray(np.uint8(image))
result.save(IMAGE_TO_DREAM_OUTPUT)

View file

@ -0,0 +1,10 @@
#!/usr/bin/env python
""" Create dream 2 """
bc = BatCountry(args.base_model)
features = bc.prepare_guide(Image.open(args.guide_image), end=args.layer)
image = bc.dream(np.float32(Image.open(args.image)), end=args.layer,
iter_n=20, objective_fn=BatCountry.guided_objective,
objective_features=features,)
bc.cleanup()

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB