1. NeuronDeconstructionRotors

Subreport: To Run Again On EC2

NeuronDeconstructionRotors

Creates a tiled and rotationally symmetric texture based on a style using:
  1. Random noise initialization
  2. Standard VGG19 layers
  3. Operators constraining and enhancing style
  4. Progressive resolution increase
  5. Kaleidoscopic view layer in addition to tiling layer

Color Permutations:

  1. Order: 1
    • 1,2,3
  2. Order: 2
    • -1,-3,-2
    • -3,-2,-1
    • -2,-1,-3
    • -1,-2,-3
    • 1,-2,-3
    • 1,-3,-2
    • -1,2,-3
    • -3,2,-1
    • 1,2,-3
    • 2,1,-3
    • -2,-1,3
    • -1,-2,3
    • 3,-2,1
    • 1,-2,3
    • -1,2,3
    • -1,3,2
    • 3,2,1
    • 1,3,2
    • 2,1,3
  3. Order: 3
    • -3,1,-2
    • -2,-3,1
    • -2,3,-1
    • 2,3,1
  4. Order: 4
    • -3,-2,1
    • -2,1,-3
    • -1,-3,2
    • 1,-3,2
    • -3,2,1
    • -2,1,3
  5. Order: 6
    • -2,-3,-1
    • 2,-3,1
    • -3,1,2
    • -2,3,1

Tiling Aspect Ratios:

  1. Triangular or Hexagonal: 1.732 or 0.5774
  2. Square: 1.0

Subreport: Logs for com.simiacryptus.ref.lang.ReferenceCountingBase

NeuronDeconstructionRotors.scala:77 executed in 0.00 seconds (0.000 gc):

    () => {
      implicit val implicitLog = log
      // First, basic configuration so we publish to our s3 site
      if (Option(s3bucket).filter(!_.isEmpty).isDefined)
        log.setArchiveHome(URI.create(s"s3://$s3bucket/$className/${log.getId}/"))
      log.onComplete(() => upload(log): Unit)
      val srcImage = ImageArtUtil.loadImage(log, sourceUrl, srcResolution)
      log.p(log.jpg(srcImage, "Source"))
      val animationDelay = 1000
      val renderedCanvases = new ArrayBuffer[() => BufferedImage]
      // Execute the main process while registered with the site index
      val registration = registerWithIndexGIF(renderedCanvases.filter(_ != null).map(_ ()), delay = animationDelay)
      try {
        withMonitoredGif(() => renderedCanvases.filter(_ != null).map(_ ()), delay = animationDelay) {
          val allData: List[(pipelineType, Int, Double, Double)] = (for (
            res <- new GeometricSequence {
              override def min: Double = 256
  
              override def max: Double = srcResolution
  
              override def steps: Int = 10
            }.toStream;
            layer <- VGG19.values()
          ) yield {
            val layerProduct: Tensor = simpleEval(layer.getPipeline.get(layer.name()), Tensor.fromRGB(ImageUtil.resize(srcImage, res.toInt, true)))
            (0 until layerProduct.getDimensions()(2)).map(band => (layer, band, res, layerProduct.selectBand(band).getDoubleStatistics().getAverage()))
          }).flatten.toList
          val adj = allData.groupBy(_._1).mapValues(_.map(_._4).toArray).mapValues(x => x.sum.toDouble / x.size)
  
          val bestPerResolution: Array[(pipelineType, Int, Double, Double)] = allData.groupBy(x => (x._1, x._2))
            .mapValues(_.maxBy(_._4)).values.toArray.sortBy(t => t._4 / adj(t._1)).reverse.take(20)
          for ((layer, rows) <- bestPerResolution.groupBy(_._1)) {
            log.subreport("Neurons in " + layer.name(), (sub: NotebookOutput) => {
              for ((_, band, res, _) <- rows) {
                sub.h2(layer.name() + " " + band + " at " + res.floor.toInt)
                sub.eval(() => {
                  allData.filter(_._1 == layer).filter(_._2 == band).map(t => t._3.toInt -> t._4).toMap
                })
                val size = renderedCanvases.size
                (1 to repeat).map(_ => {
                  val image = test(layer, band, layer.name() + " " + band + " @ " + res.floor.toInt, 512)(sub)
                  if (renderedCanvases.size > size) {
                    renderedCanvases(size) = () => image
                  } else {
                    renderedCanvases += (() => image)
                  }
                })
              }
            })
          }
        }
      } finally {
        registration.foreach(_.stop()(s3client, ec2client))
      }
    }

Returns

    { }

Source

Subreport: Neurons in VGG19_2

Subreport: Neurons in VGG19_1e4