Full Code of john-rocky/SemanticImage for AI

main 539927430ad3 cached
12 files
217.7 KB
77.1k tokens
1 requests
Download .txt
Showing preview only (225K chars total). Download the full file or copy to clipboard to get everything.
Repository: john-rocky/SemanticImage
Branch: main
Commit: 539927430ad3
Files: 12
Total size: 217.7 KB

Directory structure:
gitextract_0eo7rbyt/

├── .gitignore
├── .swiftpm/
│   └── xcode/
│       └── package.xcworkspace/
│           └── xcshareddata/
│               └── IDEWorkspaceChecks.plist
├── LICENSE
├── Package.swift
├── README.md
├── Sources/
│   └── SemanticImage/
│       ├── SemanticImage.swift
│       ├── segmentation.mlmodelc/
│       │   ├── metadata.json
│       │   ├── model.espresso.net
│       │   ├── model.espresso.shape
│       │   └── model.espresso.weights
│       └── segmentation.swift
└── Tests/
    └── SemanticImageTests/
        └── SemanticImageTests.swift

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
.DS_Store
/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata


================================================
FILE: .swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>IDEDidComputeMac32BitWarning</key>
	<true/>
</dict>
</plist>


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2021 MLBoy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Package.swift
================================================
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "SemanticImage",
    platforms: [
            .iOS(.v14)
            ],
    products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "SemanticImage",
            targets: ["SemanticImage"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "SemanticImage",
            dependencies: [],
            resources: [.process("segmentation.mlmodelc")]),
        .testTarget(
            name: "SemanticImageTests",
            dependencies: ["SemanticImage"]),
    ]
)


================================================
FILE: README.md
================================================
# SemanticImage

**Plug-and-play image/video filters built on Vision + CoreML + CoreImage — for iOS. Person segmentation, background blur, depth-based bokeh, style transfer, super-resolution.**

By [Daisuke Majima](https://john-rocky.github.io). Maintainer of [CoreML-Models](https://github.com/john-rocky/CoreML-Models) (1,749★).

These filters power [Blur. on the App Store](https://apps.apple.com/us/developer/daisuke-majima/id1350309854) and similar shipping iOS apps.

💼 **Open to Staff / Senior iOS / Mobile ML roles** — [john-rocky.github.io](https://john-rocky.github.io)

---

# SemanticImage

A collection of easy-to-use image / video filters.

# How to use

### Setting Up

1, Add SemanticImage to your project as Swift Package with Swift Package Manager. 
   Or just drag SemanticImage.swift to your project.

2, Import and initialize SemanticImage

```swift
import SemanticImage
```

```swift
let semanticImage = SemanticImage()
```

**Requires iOS 14 or above**

# Filter Collection

## Image

### Get Person Mask

<img width="300" src="https://user-images.githubusercontent.com/23278992/146860733-acf875a5-043c-4ebb-ab3c-f98e124f6a93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/146860762-01faf109-019f-4644-9e02-65c04adc1b79.JPG">


```swift
let maskImage:UIImage? = semanticImage.personMaskImage(uiImage: yourUIImage)
```

### Swap the background of a person

<img width="300" src="https://user-images.githubusercontent.com/23278992/146860733-acf875a5-043c-4ebb-ab3c-f98e124f6a93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/146862832-14c0f002-b4e7-43c6-92e4-8595e99e15fd.JPG">

```swift
let swappedImage:UIImage? = semanticImage.swapBackgroundOfPerson(personUIImage: yourUIImage, backgroundUIImage: yourBackgroundUIImage)
```

### Blur the backgrond of a person

<img width="300" src="https://user-images.githubusercontent.com/23278992/146860733-acf875a5-043c-4ebb-ab3c-f98e124f6a93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147166740-a762db75-142b-401c-a726-2a78d84c2496.JPG">

```swift
let blurredPersonImage:UIImage? = semanticImage.personBlur(uiImage:UIImage, intensity:Float)
// Blur intensity: 0~100 
```

### Get a prominent object mask

<img width="300" src="https://user-images.githubusercontent.com/23278992/147181216-9758bb77-c729-420c-addc-728c5da3b330.jpeg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147181239-4c28c545-8a19-4f12-99f6-78cac3c8c3c7.JPG">

```swift
let prominentMaskImage:UIImage? = semanticImage.saliencyMask(uiImage:image)
```

### Swap the background of the prominent object

<img width="300" src="https://user-images.githubusercontent.com/23278992/147267778-f158f6c9-a0bf-46ac-b4af-7a1c3008abd6.jpeg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147267793-39c9ae74-ada5-4a29-90b0-eda39145bb61.jpeg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147267801-54b04b4a-fc90-4dd7-bffb-86dc7983c17b.JPG">

```swift
let backgroundSwapImage:UIImage? = semanticImage.saliencyBlend(objectUIImage: image, backgroundUIImage: bgImage)
```

### Crop a face rectangle

<img width="300" src="https://user-images.githubusercontent.com/23278992/146860733-acf875a5-043c-4ebb-ab3c-f98e124f6a93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147011663-326292e3-982b-4214-bbb5-ebb1ceb06e02.JPG">

```swift
let faceImage:UIImage? = semanticImage.faceRectangle(uiImage: image)
```

### Crop a body rectangle

<img width="300" src="https://user-images.githubusercontent.com/23278992/146860733-acf875a5-043c-4ebb-ab3c-f98e124f6a93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147012402-f3866730-4996-4036-b7c5-1358bad547b1.JPG">

```swift
let bodyImage:UIImage? = semanticImage.humanRectangle(uiImage: image)
```

### Crop face rectangles

<img width="300" src="https://user-images.githubusercontent.com/23278992/147014241-fca3ceb0-c042-4a64-96a5-ad54c3dde96e.JPEG"> <img width="100" src="https://user-images.githubusercontent.com/23278992/147014227-3a4aa167-3cd4-492f-a515-48ec7a7e2489.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147014232-559a7373-2288-4ee1-ac88-5b2cd7a9e65d.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147014233-819fd97a-138f-4de8-8c44-3f59742e68a0.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147014235-08347066-d97f-46aa-8810-9349f6481917.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147014237-8bb38476-3073-4dd7-9a72-b836e029dc9e.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147014238-8e9b5727-2821-4798-b66b-ae2fa8673c57.JPG">

```swift
let faceImages:[UIImage] = semanticImage.faceRectangles(uiImage: image)
```

### Crop body rectangles

<img width="300" src="https://user-images.githubusercontent.com/23278992/147015645-f8b5d6a1-95cb-4656-8b51-57b24b8e82a5.jpeg"> <img width="100" src="https://user-images.githubusercontent.com/23278992/147015635-52e77dc8-87b7-44f4-89ba-cbad4e7d94d4.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147015636-d36a4cfc-202f-4ea1-bd17-860180e1001a.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147015640-33d58d38-af34-4dc5-bb6a-f46994732d8a.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147015642-ada60f8d-7637-4823-b343-e5fb4dd4c275.JPG">

```swift
let bodyImages:[UIImage] = semanticImage.humanRectangles(uiImage: image)
```

### Crop an animal(Cat/Dog) rectangle

<img width="300" src="https://user-images.githubusercontent.com/23278992/147165331-d99b2fbe-b04e-4de9-a215-226da16ab232.jpeg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/147165338-1056ce1a-86e7-441e-b782-517b1129e2a2.JPG">

```swift
let animalImage:UIImage? = semanticImage.animalRectangle(uiImage: image)
```

### Crop multiple animal(Cat/Dog) rectangles

<img width="300" src="https://user-images.githubusercontent.com/23278992/147165104-f3cace3c-ab5c-4e26-a28d-ac50e16eeb23.jpg"> <img width="100" src="https://user-images.githubusercontent.com/23278992/147165102-826e9262-0256-40c8-9fbb-4195ed1485e4.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165100-4afe5856-e0e1-4c82-a725-8a149731e5a9.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165097-0e7b946c-83bb-4f63-85df-3cf2036620a5.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165096-3e0c901b-b973-4086-a86f-b6c96d741b33.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165093-613875ed-107c-42eb-8ee4-376a01789523.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165092-a5037cc7-14ff-436c-bb1a-b1fe79ece681.JPG"><img width="100" src="https://user-images.githubusercontent.com/23278992/147165088-3fd812f9-aab5-4ca3-8b68-9e631d334039.JPG">

```swift
let animalImages:[UIImage] = semanticImage.animalRectangles(uiImage: image)
```

### Crop and warp document

<img width="300" src="https://user-images.githubusercontent.com/23278992/156080423-ec99d475-56bb-4787-9348-4c7b5d463b93.jpg"> <img width="300" src="https://user-images.githubusercontent.com/23278992/156080447-9751c793-952e-4ba6-bf47-336778934383.JPG">

```swift
let documentImage:UIImage? = semanticImage.getDocumentImage(image: image)
```

## Video

### Apply CIFilter to Video

<img width="600" src="https://user-images.githubusercontent.com/23278992/147177254-06633831-7dcd-4b4f-be3c-fc97eadbceac.gif">

```swift
guard let ciFilter = CIFilter(name: "CIEdgeWork", parameters: [kCIInputRadiusKey:3.0]) else { return }
semanticImage.ciFilterVideo(videoURL: url, ciFilter: ciFilter, { err, processedURL in
    // Handle processedURL in here.
})
// This process takes about the same time as the video playback time.
```

### Add virtual background of the person video

<img width="600" src="https://user-images.githubusercontent.com/23278992/147275276-5c108efd-f61d-4ba7-a27d-c3df5bb7cc5b.gif">

```swift
semanticImage.swapBackgroundOfPersonVideo(videoURL: url, backgroundUIImage: uiImage, { err, processedURL in
    // Handle processedURL in here.
})
    // This process takes about the same time as the video playback time.
```

### Add virtual background of the salient object video

<img width="600" src="https://user-images.githubusercontent.com/23278992/147276773-6571ca77-4b05-4ab8-a64d-1dafa8dd4be4.gif">

```swift
semanticImage.swapBGOfSalientObjectVideo(videoURL: url, backgroundUIImage: uiImage, { err, processedURL in
    // Handle processedURL in here.
})
    // This process takes about the same time as the video playback time.
```

### Process video

<img src=https://user-images.githubusercontent.com/23278992/148341103-a44f2b04-2f93-4c69-8cfd-f5ba36801075.gif width=600>

```swift
semanticImage.applyProcessingOnVideo(videoURL: url, { ciImage in
    // Write the processing of ciImage (i.e. video frame) here.
    return newImage
}, {  err, editedURL in
   // The processed video URL is returned
})
```

# Author

Daisuke Majima

Freelance iOS programmer from Japan.

PROFILES:

WORKS:

BLOGS: Medium

CONTACTS: rockyshikoku@gmail.com


================================================
FILE: Sources/SemanticImage/SemanticImage.swift
================================================
import Foundation
import Vision
import UIKit
import AVKit

public class SemanticImage {
    
    public init() {
    }
    
    @available(iOS 15.0, *)
    lazy var personSegmentationRequest = VNGeneratePersonSegmentationRequest()
    lazy var faceRectangleRequest = VNDetectFaceRectanglesRequest()
    lazy var humanRectanglesRequest:VNDetectHumanRectanglesRequest = {
       let request = VNDetectHumanRectanglesRequest()
        if #available(iOS 15.0, *) {
            request.upperBodyOnly = false
        }
        return request
    }()
    lazy var animalRequest = VNRecognizeAnimalsRequest()

    lazy var segmentationRequest:VNCoreMLRequest? =  {
        let url = try? Bundle.module.url(forResource: "segmentation", withExtension: "mlmodelc")
        let mlModel = try! MLModel(contentsOf: url!, configuration: MLModelConfiguration())
        guard let model = try? VNCoreMLModel(for: mlModel) else { return nil }
        let request = VNCoreMLRequest(model: model)
        request.imageCropAndScaleOption = .scaleFill
        return request
    }()
    lazy var rectangleRequest = VNDetectRectanglesRequest()

    let ciContext = CIContext()
    
    public func getDocumentImage(image:UIImage) -> UIImage? {
        let newImage = getCorrectOrientationUIImage(uiImage:image)
        let ciImage = CIImage(image: newImage)!
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        try! handler.perform([rectangleRequest])
        guard let result = rectangleRequest.results?.first else { return nil }
        
        let topLeft = CGPoint(x: result.topLeft.x, y: 1-result.topLeft.y)
        let topRight = CGPoint(x: result.topRight.x, y: 1-result.topRight.y)
        let bottomLeft = CGPoint(x: result.bottomLeft.x, y: 1-result.bottomLeft.y)
        let bottomRight = CGPoint(x: result.bottomRight.x, y: 1-result.bottomRight.y)

        
        let deNormalizedTopLeft = VNImagePointForNormalizedPoint(topLeft, Int(ciImage.extent.width), Int(ciImage.extent.height))
        let deNormalizedTopRight = VNImagePointForNormalizedPoint(topRight, Int(ciImage.extent.width), Int(ciImage.extent.height))
        let deNormalizedBottomLeft = VNImagePointForNormalizedPoint(bottomLeft, Int(ciImage.extent.width), Int(ciImage.extent.height))
        let deNormalizedBottomRight = VNImagePointForNormalizedPoint(bottomRight, Int(ciImage.extent.width), Int(ciImage.extent.height))

        let croppedImage = getCroppedImage(image: ciImage, topL: deNormalizedTopLeft, topR: deNormalizedTopRight, botL: deNormalizedBottomLeft, botR: deNormalizedBottomRight)
        let safeCGImage = ciContext.createCGImage(croppedImage, from: croppedImage.extent)
        let croppedUIImage = UIImage(cgImage: safeCGImage!)
        return croppedUIImage
    }
    
    private func getCroppedImage(image: CIImage, topL: CGPoint, topR: CGPoint, botL: CGPoint, botR: CGPoint) -> CIImage {
        let rectCoords = NSMutableDictionary(capacity: 4)
        
        rectCoords["inputTopLeft"] = topL.toVector(image: image)
        rectCoords["inputTopRight"] = topR.toVector(image: image)
        rectCoords["inputBottomLeft"] = botL.toVector(image: image)
        rectCoords["inputBottomRight"] = botR.toVector(image: image)
        
        guard let coords = rectCoords as? [String : Any] else {
            return image
        }
        return image.applyingFilter("CIPerspectiveCorrection", parameters: coords)
    }
    
    // MARK: Segmentation
    
    public func personMaskImage(uiImage:UIImage) -> UIImage? {
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return nil }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            if #available(iOS 15.0, *) {
                try handler.perform([personSegmentationRequest])
                guard let result = personSegmentationRequest.results?.first
                       else { print("Image processing failed.Please try with another image.") ; return nil }
                let maskCIImage = CIImage(cvPixelBuffer: result.pixelBuffer)
                let scaledMask = maskCIImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))

                guard let safeCGImage = ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
                let maskUIImage = UIImage(cgImage: safeCGImage)
                return maskUIImage
            } else {
                guard let segmentationRequest = segmentationRequest else {
                    print("This func can't be used in this OS version."); return nil
                }
                try handler.perform([segmentationRequest])
                guard let result = segmentationRequest.results?.first as? VNPixelBufferObservation
                       else { print("Image processing failed.Please try with another image.") ; return nil }
                let maskCIImage = CIImage(cvPixelBuffer: result.pixelBuffer)
                let scaledMask = maskCIImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))

                guard let safeCGImage = ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
                let maskUIImage = UIImage(cgImage: safeCGImage)
                return maskUIImage
            }
        } catch let error {
            print("Vision error \(error)")
            return nil
        }
    }
    
    
    public func swapBackgroundOfPerson(personUIImage: UIImage, backgroundUIImage: UIImage) -> UIImage? {
        let newPersonUIImage = getCorrectOrientationUIImage(uiImage:personUIImage)
        let newBackgroundUIImage = getCorrectOrientationUIImage(uiImage:backgroundUIImage)
        
        guard let personCIImage = CIImage(image: newPersonUIImage),
              let backgroundCIImage = CIImage(image: newBackgroundUIImage),
              let maskUIImage = personMaskImage(uiImage: newPersonUIImage),
              let maskCIImage = CIImage(image: maskUIImage) else {
                  return nil }
        
        let backgroundImageSize = backgroundCIImage.extent
        let originalSize = personCIImage.extent
        var scale:CGFloat = 1
        let widthScale =  originalSize.width / backgroundImageSize.width
        let heightScale = originalSize.height / backgroundImageSize.height
        if widthScale > heightScale {
            scale = personCIImage.extent.width / backgroundImageSize.width
        } else {
            scale = personCIImage.extent.height / backgroundImageSize.height
        }
        
        let scaledBG = backgroundCIImage.resize(as: CGSize(width: backgroundCIImage.extent.width*scale, height: backgroundCIImage.extent.height*scale))
        let BGCenter = CGPoint(x: scaledBG.extent.width/2, y: scaledBG.extent.height/2)
        let originalExtent = personCIImage.extent
        let cropRect = CGRect(x: BGCenter.x-(originalExtent.width/2), y: BGCenter.y-(originalExtent.height/2), width: originalExtent.width, height: originalExtent.height)
        let croppedBG = scaledBG.cropped(to: cropRect)
        let translate = CGAffineTransform(translationX: -croppedBG.extent.minX, y: -croppedBG.extent.minY)
        let traslatedBG = croppedBG.transformed(by: translate)
        guard let blended = CIFilter(name: "CIBlendWithMask", parameters: [
            kCIInputImageKey: personCIImage,
            kCIInputBackgroundImageKey:traslatedBG,
            kCIInputMaskImageKey:maskCIImage])?.outputImage else { return nil }
        guard let safeCGImage = ciContext.createCGImage(blended, from: blended.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
        let blendedUIImage = UIImage(cgImage: safeCGImage)
        return blendedUIImage
    }
    
    public func personBlur(uiImage:UIImage, intensity:Float) -> UIImage?{
        let newUIImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let originalCIImage = CIImage(image: newUIImage),
              let maskUIImage = personMaskImage(uiImage: newUIImage),
              let maskCIImage = CIImage(image: maskUIImage) else { print("Image processing failed.Please try with another image."); return nil }
        let safeCropSize = CGRect(x: 0, y: 0, width: originalCIImage.extent.width * 0.999, height: originalCIImage.extent.height * 0.999)
        guard let blurBGCIImage = CIFilter(name: "CIGaussianBlur", parameters: [kCIInputImageKey:originalCIImage,
                                                                         kCIInputRadiusKey:intensity])?.outputImage?.cropped(to: safeCropSize).resize(as: originalCIImage.extent.size) else { return nil }
        guard let blendedCIImage = CIFilter(name: "CIBlendWithMask", parameters: [
            kCIInputImageKey: originalCIImage,
            kCIInputBackgroundImageKey:blurBGCIImage,
            kCIInputMaskImageKey:maskCIImage])?.outputImage,
              let safeCGImage = ciContext.createCGImage(blendedCIImage, from: blendedCIImage.extent)else {  print("Image processing failed.Please try with another image."); return nil }
        
        let final = UIImage(cgImage: safeCGImage)
        return final
    }
    
    // MARK: Saliency
    
    public func saliencyMask(uiImage:UIImage) -> UIImage? {
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage),
              let request = segmentationRequest else { print("Image processing failed.Please try with another image."); return nil }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([request])
            guard let result = request.results?.first as? VNPixelBufferObservation
                   else { print("Image processing failed.Please try with another image.") ; return nil }
            let maskCIImage = CIImage(cvPixelBuffer: result.pixelBuffer)
            let scaledMask = maskCIImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))

            guard let safeCGImage = ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
            let maskUIImage = UIImage(cgImage: safeCGImage)
            return maskUIImage

        } catch let error {
            print("Vision error \(error)")
            return nil
        }
    }
    
    public func saliencyBlend(objectUIImage:UIImage, backgroundUIImage: UIImage) -> UIImage? {
        let newSaliencyUIImage = getCorrectOrientationUIImage(uiImage:objectUIImage)
        let newBackgroundUIImage = getCorrectOrientationUIImage(uiImage:backgroundUIImage)
        
        guard let personCIImage = CIImage(image: newSaliencyUIImage),
              let backgroundCIImage = CIImage(image: newBackgroundUIImage),
              let maskUIImage = saliencyMask(uiImage: newSaliencyUIImage),
              let maskCIImage = CIImage(image: maskUIImage) else {
                  return nil }
        
        let backgroundImageSize = backgroundCIImage.extent
        let originalSize = personCIImage.extent
        var scale:CGFloat = 1
        let widthScale =  originalSize.width / backgroundImageSize.width
        let heightScale = originalSize.height / backgroundImageSize.height
        if widthScale > heightScale {
            scale = personCIImage.extent.width / backgroundImageSize.width
        } else {
            scale = personCIImage.extent.height / backgroundImageSize.height
        }
        
        let scaledBG = backgroundCIImage.resize(as: CGSize(width: backgroundCIImage.extent.width*scale, height: backgroundCIImage.extent.height*scale))
        let BGCenter = CGPoint(x: scaledBG.extent.width/2, y: scaledBG.extent.height/2)
        let originalExtent = personCIImage.extent
        let cropRect = CGRect(x: BGCenter.x-(originalExtent.width/2), y: BGCenter.y-(originalExtent.height/2), width: originalExtent.width, height: originalExtent.height)
        let croppedBG = scaledBG.cropped(to: cropRect)
        let translate = CGAffineTransform(translationX: -croppedBG.extent.minX, y: -croppedBG.extent.minY)
        let traslatedBG = croppedBG.transformed(by: translate)
        print(traslatedBG.extent)
        guard let blended = CIFilter(name: "CIBlendWithMask", parameters: [
            kCIInputImageKey: personCIImage,
            kCIInputBackgroundImageKey:traslatedBG,
            kCIInputMaskImageKey:maskCIImage])?.outputImage,
              let safeCGImage = ciContext.createCGImage(blended, from: blended.extent) else { print("Image processing failed.Please try with another image."); return nil }
        let blendedUIImage = UIImage(cgImage: safeCGImage)
        return blendedUIImage
    }
    
    // MARK: Rectangle
    
    
    public func faceRectangle(uiImage:UIImage) -> UIImage? {
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return nil }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([faceRectangleRequest])
            guard let result = faceRectangleRequest.results?.first else { print("Image processing failed.Please try with another image."); return nil }
                let boundingBox = result.boundingBox
                let faceRect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
            var doubleScaleRect = CGRect(x: faceRect.minX - faceRect.width * 0.5, y: faceRect.minY - faceRect.height * 0.5, width: faceRect.width * 2, height: faceRect.height * 2)
            if doubleScaleRect.minX < 0 {
                doubleScaleRect.origin.x = 0
            }

            if doubleScaleRect.minY < 0 {
                doubleScaleRect.origin.y = 0
            }
            if doubleScaleRect.maxX > ciImage.extent.maxX  {
                doubleScaleRect = CGRect(x: doubleScaleRect.origin.x, y: doubleScaleRect.origin.y, width: ciImage.extent.width - doubleScaleRect.origin.x, height: doubleScaleRect.height)
            }
            if doubleScaleRect.maxY > ciImage.extent.maxY  {
                doubleScaleRect = CGRect(x: doubleScaleRect.origin.x, y: doubleScaleRect.origin.y, width: doubleScaleRect.width, height: ciImage.extent.height - doubleScaleRect.origin.y)
            }
            
                let faceImage = ciImage.cropped(to: doubleScaleRect)
                guard let final = ciContext.createCGImage(faceImage, from: faceImage.extent) else { print("Image processing failed.Please try with another image."); return nil }
                let finalUiimage =  UIImage(cgImage: final)
                return finalUiimage
        } catch let error {
            print("Vision error \(error)")
            return nil
        }
    }
    
    public func faceRectangles(uiImage:UIImage) -> [UIImage] {
        var faceUIImages:[UIImage] = []
        let semaphore = DispatchSemaphore(value: 0)
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return [] }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([faceRectangleRequest])
            guard let results = faceRectangleRequest.results else { print("Image processing failed.Please try with another image."); return [] }
            guard !results.isEmpty else { print("Image processing failed.Please try with another image."); return [] }
            for result in results {
                let boundingBox = result.boundingBox
                let faceRect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
            var doubleScaleRect = CGRect(x: faceRect.minX - faceRect.width * 0.5, y: faceRect.minY - faceRect.height * 0.5, width: faceRect.width * 2, height: faceRect.height * 2)
            if doubleScaleRect.minX < 0 {
                doubleScaleRect.origin.x = 0
            }

            if doubleScaleRect.minY < 0 {
                doubleScaleRect.origin.y = 0
            }
            if doubleScaleRect.maxX > ciImage.extent.maxX  {
                doubleScaleRect = CGRect(x: doubleScaleRect.origin.x, y: doubleScaleRect.origin.y, width: ciImage.extent.width - doubleScaleRect.origin.x, height: doubleScaleRect.height)
            }
            if doubleScaleRect.maxY > ciImage.extent.maxY  {
                doubleScaleRect = CGRect(x: doubleScaleRect.origin.x, y: doubleScaleRect.origin.y, width: doubleScaleRect.width, height: ciImage.extent.height - doubleScaleRect.origin.y)
            }
            
                let faceImage = ciImage.cropped(to: doubleScaleRect)
                guard let final = ciContext.createCGImage(faceImage, from: faceImage.extent) else { print("Image processing failed.Please try with another image."); return [] }
                let finalUiimage =  UIImage(cgImage: final)
                faceUIImages.append(finalUiimage)
                if faceUIImages.count == results.count {
                    semaphore.signal()
                }
            }
            semaphore.wait()
            return faceUIImages
        } catch let error {
            print("Vision error \(error)")
            return []
        }
    }
    
    public func humanRectangle(uiImage:UIImage) -> UIImage? {
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return nil }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([humanRectanglesRequest])
            guard let result = humanRectanglesRequest.results?.first else { print("Image processing failed.Please try with another image."); return nil }
            let boundingBox = result.boundingBox
            let humanRect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
            let humanImage = ciImage.cropped(to: humanRect)
            guard let final = ciContext.createCGImage(humanImage, from: humanImage.extent) else { print("Image processing failed.Please try with another image."); return nil }
            let finalUiimage =  UIImage(cgImage: final)
            return finalUiimage
        } catch let error {
            print("Vision error \(error)")
            return nil
        }
    }
    
    public func humanRectangles(uiImage:UIImage) -> [UIImage] {
        var bodyUIImages:[UIImage] = []
        let semaphore = DispatchSemaphore(value: 0)
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return [] }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([humanRectanglesRequest])
            guard let results = humanRectanglesRequest.results else { print("Image processing failed.Please try with another image."); return [] }
            guard !results.isEmpty else { print("Image processing failed.Please try with another image."); return [] }
            
            for result in results {
                let boundingBox = result.boundingBox
                let humanRect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
                let humanImage = ciImage.cropped(to: humanRect)
                guard let final = ciContext.createCGImage(humanImage, from: humanImage.extent) else { print("Image processing failed.Please try with another image."); return [] }
                let finalUiimage =  UIImage(cgImage: final)
                bodyUIImages.append(finalUiimage)
                if bodyUIImages.count == results.count {
                    semaphore.signal()
                }
            }
            semaphore.wait()
            return bodyUIImages
        } catch let error {
            print("Vision error \(error)")
            return []
        }
    }
    
    public func animalRectangle(uiImage:UIImage) -> UIImage?{
        
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return nil }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([animalRequest])
            guard let result = animalRequest.results?.first else { print("Image processing failed.Please try with another image."); return nil }
            let boundingBox = result.boundingBox
            let rect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
            let croppedImage = ciImage.cropped(to: rect)
            guard let final = ciContext.createCGImage(croppedImage, from: croppedImage.extent) else { print("Image processing failed.Please try with another image."); return nil }
            let finalUiimage =  UIImage(cgImage: final)
            return finalUiimage
        } catch let error {
            print("Vision error \(error)")
            return nil
        }
    }
    
    public func animalRectangles(uiImage:UIImage) -> [UIImage] {
        var animalUIImages:[UIImage] = []
        let semaphore = DispatchSemaphore(value: 0)
        let newImage = getCorrectOrientationUIImage(uiImage:uiImage)
        guard let ciImage = CIImage(image: newImage) else { print("Image processing failed.Please try with another image."); return [] }
        let handler = VNImageRequestHandler(ciImage: ciImage, options: [:])
        do {
            try handler.perform([animalRequest])
            guard let results = animalRequest.results else { print("Image processing failed.Please try with another image."); return [] }
            guard !results.isEmpty else { print("Image processing failed.Please try with another image."); return [] }
            
            for result in results {
                let boundingBox = result.boundingBox
                let rect = VNImageRectForNormalizedRect((boundingBox),Int(ciImage.extent.size.width), Int(ciImage.extent.size.height))
                let croppedImage = ciImage.cropped(to: rect)
                guard let final = ciContext.createCGImage(croppedImage, from: croppedImage.extent) else { print("Image processing failed.Please try with another image."); return [] }
                let finalUiimage =  UIImage(cgImage: final)
                animalUIImages.append(finalUiimage)
                if animalUIImages.count == results.count {
                    semaphore.signal()
                }
            }
            semaphore.wait()
            return animalUIImages
        } catch let error {
            print("Vision error \(error)")
            return []
        }
    }
    
    public func swapBGOfSalientObjectVideo(videoURL:URL, backgroundUIImage: UIImage, _ completion: ((_ err: NSError?, _ filteredVideoURL: URL?) -> Void)?) {
        guard let bgCIImage = CIImage(image: backgroundUIImage) else { print("background image is nil") ; return}
        applyProcessingOnVideo(videoURL: videoURL, { ciImage in
            let personCIImage = ciImage
            let backgroundCIImage = bgCIImage
            var maskCIImage:CIImage
            let handler = VNImageRequestHandler(ciImage: personCIImage, options: [:])
            do {
                guard let segmentationRequest = self.segmentationRequest else {
                    print("This func can't be used in this OS version."); return nil
                }
                try handler.perform([segmentationRequest])
                guard let result = segmentationRequest.results?.first as? VNPixelBufferObservation
                else { print("Image processing failed.Please try with another image.") ; return nil }
                let maskImage = CIImage(cvPixelBuffer: result.pixelBuffer)
                let scaledMask = maskImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))
                
                guard let safeCGImage = self.ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
                maskCIImage = CIImage(cgImage: safeCGImage)
            } catch let error {
                print("Vision error \(error)")
                return ciImage
            }
            
            let backgroundImageSize = backgroundCIImage.extent
            let originalSize = personCIImage.extent
            var scale:CGFloat = 1
            let widthScale =  originalSize.width / backgroundImageSize.width
            let heightScale = originalSize.height / backgroundImageSize.height
            if widthScale > heightScale {
                scale = personCIImage.extent.width / backgroundImageSize.width
            } else {
                scale = personCIImage.extent.height / backgroundImageSize.height
            }
            
            let scaledBG = backgroundCIImage.resize(as: CGSize(width: backgroundCIImage.extent.width*scale, height: backgroundCIImage.extent.height*scale))
            let BGCenter = CGPoint(x: scaledBG.extent.width/2, y: scaledBG.extent.height/2)
            let originalExtent = personCIImage.extent
            let cropRect = CGRect(x: BGCenter.x-(originalExtent.width/2), y: BGCenter.y-(originalExtent.height/2), width: originalExtent.width, height: originalExtent.height)
            let croppedBG = scaledBG.cropped(to: cropRect)
            let translate = CGAffineTransform(translationX: -croppedBG.extent.minX, y: -croppedBG.extent.minY)
            let traslatedBG = croppedBG.transformed(by: translate)
            guard let blended = CIFilter(name: "CIBlendWithMask", parameters: [
                kCIInputImageKey: personCIImage,
                kCIInputBackgroundImageKey:traslatedBG,
                kCIInputMaskImageKey:maskCIImage])?.outputImage,
                  let safeCGImage = self.ciContext.createCGImage(blended, from: blended.extent) else {return ciImage}
                    let outCIImage = CIImage(cgImage: safeCGImage)
            return outCIImage
        } , { err, processedVideoURL in
            guard err == nil else { print(err?.localizedDescription); return }
            completion?(err,processedVideoURL)
        })
    }
    
    public func swapBackgroundOfPersonVideo(videoURL:URL, backgroundUIImage: UIImage, _ completion: ((_ err: NSError?, _ filteredVideoURL: URL?) -> Void)?) {
        guard let bgCIImage = CIImage(image: backgroundUIImage) else { print("background image is nil") ; return}
        applyProcessingOnVideo(videoURL: videoURL, { ciImage in
            let personCIImage = ciImage
            let backgroundCIImage = bgCIImage
            var maskCIImage:CIImage
            let handler = VNImageRequestHandler(ciImage: personCIImage, options: [:])
            do {
                if #available(iOS 15.0, *) {
                    try handler.perform([self.personSegmentationRequest])
                    guard let result = self.personSegmentationRequest.results?.first
                           else { print("Image processing failed.Please try with another image.") ; return nil }
                    let maskImage = CIImage(cvPixelBuffer: result.pixelBuffer)
                    let scaledMask = maskImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))

                    guard let safeCGImage = self.ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
                    maskCIImage = CIImage(cgImage: safeCGImage)
                } else {
                    guard let segmentationRequest = self.segmentationRequest else {
                        print("This func can't be used in this OS version."); return nil
                    }
                    try handler.perform([segmentationRequest])
                    guard let result = segmentationRequest.results?.first as? VNPixelBufferObservation
                           else { print("Image processing failed.Please try with another image.") ; return nil }
                    let maskImage = CIImage(cvPixelBuffer: result.pixelBuffer)
                    let scaledMask = maskImage.resize(as: CGSize(width: ciImage.extent.width, height: ciImage.extent.height))

                    guard let safeCGImage = self.ciContext.createCGImage(scaledMask, from: scaledMask.extent) else { print("Image processing failed.Please try with another image.") ; return nil }
                    maskCIImage = CIImage(cgImage: safeCGImage)
                }
            } catch let error {
                print("Vision error \(error)")
                return ciImage
            }
            
            let backgroundImageSize = backgroundCIImage.extent
            let originalSize = personCIImage.extent
            var scale:CGFloat = 1
            let widthScale =  originalSize.width / backgroundImageSize.width
            let heightScale = originalSize.height / backgroundImageSize.height
            if widthScale > heightScale {
                scale = personCIImage.extent.width / backgroundImageSize.width
            } else {
                scale = personCIImage.extent.height / backgroundImageSize.height
            }
            
            let scaledBG = backgroundCIImage.resize(as: CGSize(width: backgroundCIImage.extent.width*scale, height: backgroundCIImage.extent.height*scale))
            let BGCenter = CGPoint(x: scaledBG.extent.width/2, y: scaledBG.extent.height/2)
            let originalExtent = personCIImage.extent
            let cropRect = CGRect(x: BGCenter.x-(originalExtent.width/2), y: BGCenter.y-(originalExtent.height/2), width: originalExtent.width, height: originalExtent.height)
            let croppedBG = scaledBG.cropped(to: cropRect)
            let translate = CGAffineTransform(translationX: -croppedBG.extent.minX, y: -croppedBG.extent.minY)
            let traslatedBG = croppedBG.transformed(by: translate)
            guard let blended = CIFilter(name: "CIBlendWithMask", parameters: [
                kCIInputImageKey: personCIImage,
                kCIInputBackgroundImageKey:traslatedBG,
                kCIInputMaskImageKey:maskCIImage])?.outputImage,
                  let safeCGImage = self.ciContext.createCGImage(blended, from: blended.extent) else {return ciImage}
                    let outCIImage = CIImage(cgImage: safeCGImage)
            return outCIImage
        } , { err, processedVideoURL in
            guard err == nil else { print(err?.localizedDescription); return }
            completion?(err,processedVideoURL)
        })
    }
    
    public func ciFilterVideo(videoURL:URL, ciFilter: CIFilter, _ completion: ((_ err: NSError?, _ filteredVideoURL: URL?) -> Void)?) {
        applyProcessingOnVideo(videoURL: videoURL, { ciImage in
            ciFilter.setValue(ciImage, forKey: kCIInputImageKey)
            let outCIImage = ciFilter.outputImage
            return outCIImage
        } , { err, processedVideoURL in
            guard err == nil else { print(err?.localizedDescription as Any); return }
            completion?(err,processedVideoURL)
        })
    }
    
    public func applyProcessingOnVideo(videoURL:URL, _ processingFunction: @escaping ((CIImage) -> CIImage?), _ completion: ((_ err: NSError?, _ processedVideoURL: URL?) -> Void)?) {
        var frame:Int = 0
        var isFrameRotated = false
        let asset = AVURLAsset(url: videoURL)
        let duration = asset.duration.value
        let frameRate = asset.preferredRate
        let totalFrame = frameRate * Float(duration)
        let err: NSError = NSError.init(domain: "SemanticImage", code: 999, userInfo: [NSLocalizedDescriptionKey: "Video Processing Failed"])
        guard let writingDestinationUrl: URL  = try? FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true).appendingPathComponent("\(Date())" + ".mp4") else { print("nil"); return}

        // setup

        guard let reader: AVAssetReader = try? AVAssetReader.init(asset: asset) else {
            completion?(err, nil)
            return
        }
        guard let writer: AVAssetWriter = try? AVAssetWriter(outputURL: writingDestinationUrl, fileType: AVFileType.mov) else {
            completion?(err, nil)
            return
        }
        
        // setup finish closure

        var audioFinished: Bool = false
        var videoFinished: Bool = false
        let writtingFinished: (() -> Void) = {
            if audioFinished == true && videoFinished == true {
                writer.finishWriting {
                    completion?(nil, writingDestinationUrl)
                }
                reader.cancelReading()
            }
        }
        
        // prepare video reader
        
        let readerVideoOutput: AVAssetReaderTrackOutput = AVAssetReaderTrackOutput(
            track: asset.tracks(withMediaType: AVMediaType.video)[0],
            outputSettings: [
                kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange),
            ]
        )
        
        reader.add(readerVideoOutput)
        
        // prepare audio reader
        
        var readerAudioOutput: AVAssetReaderTrackOutput!
        if asset.tracks(withMediaType: AVMediaType.audio).count <= 0 {
            audioFinished = true
        } else {
            readerAudioOutput = AVAssetReaderTrackOutput.init(
                track: asset.tracks(withMediaType: AVMediaType.audio)[0],
                outputSettings: [
                    AVSampleRateKey: 44100,
                    AVFormatIDKey:   kAudioFormatLinearPCM,
                ]
            )
            if reader.canAdd(readerAudioOutput) {
                reader.add(readerAudioOutput)
            } else {
                print("Cannot add audio output reader")
                audioFinished = true
            }
        }
        
        // prepare video input
        
        let transform = asset.tracks(withMediaType: AVMediaType.video)[0].preferredTransform
        let radians = atan2(transform.b, transform.a)
        let degrees = (radians * 180.0) / .pi
        
        var writerVideoInput: AVAssetWriterInput
        switch degrees {
        case 90:
            let rotateTransform = CGAffineTransform(rotationAngle: 0)
            writerVideoInput = AVAssetWriterInput.init(
                mediaType: AVMediaType.video,
                outputSettings: [
                    AVVideoCodecKey:                 AVVideoCodecType.h264,
                    AVVideoWidthKey:                 asset.tracks(withMediaType: AVMediaType.video)[0].naturalSize.height,
                    AVVideoHeightKey:                asset.tracks(withMediaType: AVMediaType.video)[0].naturalSize.width,
                    AVVideoCompressionPropertiesKey: [
                        AVVideoAverageBitRateKey: asset.tracks(withMediaType: AVMediaType.video)[0].estimatedDataRate,
                    ],
                ]
            )
            writerVideoInput.expectsMediaDataInRealTime = false
            
            isFrameRotated = true
            writerVideoInput.transform = rotateTransform
        default:
            writerVideoInput = AVAssetWriterInput.init(
                mediaType: AVMediaType.video,
                outputSettings: [
                    AVVideoCodecKey:                 AVVideoCodecType.h264,
                    AVVideoWidthKey:                 asset.tracks(withMediaType: AVMediaType.video)[0].naturalSize.width,
                    AVVideoHeightKey:                asset.tracks(withMediaType: AVMediaType.video)[0].naturalSize.height,
                    AVVideoCompressionPropertiesKey: [
                        AVVideoAverageBitRateKey: asset.tracks(withMediaType: AVMediaType.video)[0].estimatedDataRate,
                    ],
                ]
            )
            writerVideoInput.expectsMediaDataInRealTime = false
            isFrameRotated = false
            writerVideoInput.transform = asset.tracks(withMediaType: AVMediaType.video)[0].preferredTransform
        }
        let pixelBufferAdaptor = AVAssetWriterInputPixelBufferAdaptor(assetWriterInput: writerVideoInput, sourcePixelBufferAttributes: [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32BGRA)])
        
        writer.add(writerVideoInput)
        
        
        // prepare writer input for audio
        
        var writerAudioInput: AVAssetWriterInput! = nil
        if asset.tracks(withMediaType: AVMediaType.audio).count > 0 {
            let formatDesc: [Any] = asset.tracks(withMediaType: AVMediaType.audio)[0].formatDescriptions
            var channels: UInt32 = 1
            var sampleRate: Float64 = 44100.000000
            for i in 0 ..< formatDesc.count {
                guard let bobTheDesc: UnsafePointer<AudioStreamBasicDescription> = CMAudioFormatDescriptionGetStreamBasicDescription(formatDesc[i] as! CMAudioFormatDescription) else {
                    continue
                }
                channels = bobTheDesc.pointee.mChannelsPerFrame
                sampleRate = bobTheDesc.pointee.mSampleRate
                break
            }
            writerAudioInput = AVAssetWriterInput.init(
                mediaType: AVMediaType.audio,
                outputSettings: [
                    AVFormatIDKey:         kAudioFormatMPEG4AAC,
                    AVNumberOfChannelsKey: channels,
                    AVSampleRateKey:       sampleRate,
                    AVEncoderBitRateKey:   128000,
                ]
            )
            writerAudioInput.expectsMediaDataInRealTime = true
            writer.add(writerAudioInput)
        }
        

        // write
        
        let videoQueue = DispatchQueue.init(label: "videoQueue")
        let audioQueue = DispatchQueue.init(label: "audioQueue")
        writer.startWriting()
        reader.startReading()
        writer.startSession(atSourceTime: CMTime.zero)

        // write video
        
        writerVideoInput.requestMediaDataWhenReady(on: videoQueue) {
            while writerVideoInput.isReadyForMoreMediaData {
                autoreleasepool {
                    if let buffer = readerVideoOutput.copyNextSampleBuffer(),let pixelBuffer = CMSampleBufferGetImageBuffer(buffer) {
                        frame += 1
                        var ciImage = CIImage(cvPixelBuffer: pixelBuffer)
                        if isFrameRotated {
                            ciImage = ciImage.oriented(CGImagePropertyOrientation.right)
                        }
                        guard let outCIImage = processingFunction(ciImage) else { print("Video Processing Failed") ; return }
                        
                        let presentationTime = CMSampleBufferGetOutputPresentationTimeStamp(buffer)
                        var pixelBufferOut: CVPixelBuffer?
                        CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, pixelBufferAdaptor.pixelBufferPool!, &pixelBufferOut)
                        self.ciContext.render(outCIImage, to: pixelBufferOut!)
                        pixelBufferAdaptor.append(pixelBufferOut!, withPresentationTime: presentationTime)
                        
//                        if frame % 100 == 0 {
//                            print("\(frame) / \(totalFrame) frames were processed..")
//                        }
                    } else {
                        writerVideoInput.markAsFinished()
                        DispatchQueue.main.async {
                            videoFinished = true
                            writtingFinished()
                        }
                    }
                }
            }
        }
        if writerAudioInput != nil {
            writerAudioInput.requestMediaDataWhenReady(on: audioQueue) {
                while writerAudioInput.isReadyForMoreMediaData {
                    autoreleasepool {
                        let buffer = readerAudioOutput.copyNextSampleBuffer()
                        if buffer != nil {
                            writerAudioInput.append(buffer!)
                        } else {
                            writerAudioInput.markAsFinished()
                            DispatchQueue.main.async {
                                audioFinished = true
                                writtingFinished()
                            }
                        }
                    }
                }
            }
        }
    }
    
    func scaleMaskImage(maskCIImage:CIImage, originalCIImage:CIImage) -> CIImage {
        let scaledMaskCIImage = maskCIImage.resize(as: originalCIImage.extent.size)
        return scaledMaskCIImage
    }
    
    public func getCorrectOrientationUIImage(uiImage:UIImage) -> UIImage {
            var newImage = UIImage()
            switch uiImage.imageOrientation.rawValue {
            case 1:
                guard let orientedCIImage = CIImage(image: uiImage)?.oriented(CGImagePropertyOrientation.down),
                      let cgImage = ciContext.createCGImage(orientedCIImage, from: orientedCIImage.extent) else { return uiImage}
                
                newImage = UIImage(cgImage: cgImage)
            case 3:
                guard let orientedCIImage = CIImage(image: uiImage)?.oriented(CGImagePropertyOrientation.right),
                        let cgImage = ciContext.createCGImage(orientedCIImage, from: orientedCIImage.extent) else { return uiImage}
                newImage = UIImage(cgImage: cgImage)
            default:
                newImage = uiImage
            }
        return newImage
    }
}
    
extension CIImage {
    func resize(as size: CGSize) -> CIImage {
        let selfSize = extent.size
        let transform = CGAffineTransform(scaleX: size.width / selfSize.width, y: size.height / selfSize.height)
        return transformed(by: transform)
    }
}

extension CGPoint {
    func toVector(image: CIImage) -> CIVector {
        return CIVector(x: x, y: image.extent.height-y)
    }
}



================================================
FILE: Sources/SemanticImage/segmentation.mlmodelc/metadata.json
================================================
[
  {
    "metadataOutputVersion" : "3.0",
    "storagePrecision" : "Float32",
    "outputSchema" : [
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p0"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p1"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p2"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p3"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p4"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p5"
      },
      {
        "height" : "320",
        "colorspace" : "Grayscale",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "0",
        "formattedType" : "Image (Grayscale 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "out_p6"
      }
    ],
    "modelParameters" : [

    ],
    "specificationVersion" : 5,
    "computePrecision" : "Float16",
    "isUpdatable" : "0",
    "availability" : {
      "macOS" : "11.0",
      "tvOS" : "14.0",
      "watchOS" : "7.0",
      "iOS" : "14.0",
      "macCatalyst" : "14.0"
    },
    "neuralNetworkLayerTypeHistogram" : {
      "Concat" : 51,
      "ActivationLinear" : 7,
      "ActivationReLU" : 112,
      "UpsampleBiLinear" : 38,
      "Add" : 11,
      "BatchNorm" : 112,
      "Convolution" : 119,
      "ActivationSigmoid" : 7,
      "PoolingMax" : 33
    },
    "modelType" : {
      "name" : "MLModelType_neuralNetwork"
    },
    "userDefinedMetadata" : {
      "com.github.apple.coremltools.version" : "4.1",
      "com.github.apple.coremltools.source" : "torch==1.8.1+cu101"
    },
    "generatedClassName" : "segmentation",
    "inputSchema" : [
      {
        "height" : "320",
        "colorspace" : "RGB",
        "isOptional" : "0",
        "width" : "320",
        "isColor" : "1",
        "formattedType" : "Image (Color 320 × 320)",
        "hasSizeFlexibility" : "0",
        "type" : "Image",
        "shortDescription" : "",
        "name" : "in_0"
      }
    ],
    "method" : "predict"
  }
]

================================================
FILE: Sources/SemanticImage/segmentation.mlmodelc/model.espresso.net
================================================
{
  "layers" : [
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.2",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.4",
      "blob_weights" : 3,
      "K" : 3,
      "blob_biases" : 1,
      "name" : "input.2",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "in_0",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.5",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.7",
      "blob_weights" : 7,
      "K" : 64,
      "blob_biases" : 5,
      "name" : "input.5",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.4",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.8",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.8",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.8",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.7",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.9",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.11",
      "blob_weights" : 11,
      "K" : 16,
      "blob_biases" : 9,
      "name" : "input.9",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.8",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.12",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.12",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.12",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.11",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.13",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.15",
      "blob_weights" : 15,
      "K" : 16,
      "blob_biases" : 13,
      "name" : "input.13",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.12",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.16",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.16",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.16",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.15",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.17",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.19",
      "blob_weights" : 19,
      "K" : 16,
      "blob_biases" : 17,
      "name" : "input.17",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.16",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.20",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.20",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.20",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.19",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.21",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.23",
      "blob_weights" : 23,
      "K" : 16,
      "blob_biases" : 21,
      "name" : "input.21",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.20",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.24",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.24",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.24",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.23",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.25",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.27",
      "blob_weights" : 27,
      "K" : 16,
      "blob_biases" : 25,
      "name" : "input.25",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.24",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.28",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx7.1",
      "blob_weights" : 31,
      "K" : 16,
      "blob_biases" : 29,
      "name" : "input.28",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.27",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.30",
      "top" : "input.30",
      "type" : "concat",
      "name" : "input.30",
      "bottom" : "hx7.1,input.27"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.31",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.33",
      "blob_weights" : 35,
      "K" : 32,
      "blob_biases" : 33,
      "name" : "input.31",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.30",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx6dup.1",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.33",
      "debug_info" : "hx6dup.1",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx6dup.1",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.34",
      "top" : "input.34",
      "type" : "concat",
      "name" : "input.34",
      "bottom" : "hx6dup.1,input.23"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.35",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.37",
      "blob_weights" : 39,
      "K" : 32,
      "blob_biases" : 37,
      "name" : "input.35",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.34",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx5dup.1",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.37",
      "debug_info" : "hx5dup.1",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx5dup.1",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.38",
      "top" : "input.38",
      "type" : "concat",
      "name" : "input.38",
      "bottom" : "hx5dup.1,input.19"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.39",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.41",
      "blob_weights" : 43,
      "K" : 32,
      "blob_biases" : 41,
      "name" : "input.39",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.38",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup.1",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.41",
      "debug_info" : "hx4dup.1",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.1",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.42",
      "top" : "input.42",
      "type" : "concat",
      "name" : "input.42",
      "bottom" : "hx4dup.1,input.15"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.43",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.45",
      "blob_weights" : 47,
      "K" : 32,
      "blob_biases" : 45,
      "name" : "input.43",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.42",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.1",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.45",
      "debug_info" : "hx3dup.1",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.1",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.46",
      "top" : "input.46",
      "type" : "concat",
      "name" : "input.46",
      "bottom" : "hx3dup.1,input.11"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.47",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.49",
      "blob_weights" : 51,
      "K" : 32,
      "blob_biases" : 49,
      "name" : "input.47",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.46",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.1",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.49",
      "debug_info" : "hx2dup.1",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.1",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.50",
      "top" : "input.50",
      "type" : "concat",
      "name" : "input.50",
      "bottom" : "hx2dup.1,input.7"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.51",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.1",
      "blob_weights" : 55,
      "K" : 32,
      "blob_biases" : 53,
      "name" : "input.51",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.50",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.4,hx1d.1",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.53",
      "top" : "input.53",
      "type" : "elementwise",
      "name" : "input.53",
      "beta" : 0
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.54",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.54",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.54",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.53",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.55",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.57",
      "blob_weights" : 59,
      "K" : 64,
      "blob_biases" : 57,
      "name" : "input.55",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.54",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.58",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.60",
      "blob_weights" : 63,
      "K" : 64,
      "blob_biases" : 61,
      "name" : "input.58",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.57",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.61",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.61",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.61",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.60",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.62",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.64",
      "blob_weights" : 67,
      "K" : 16,
      "blob_biases" : 65,
      "name" : "input.62",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.61",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.65",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.65",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.65",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.64",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.66",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.68",
      "blob_weights" : 71,
      "K" : 16,
      "blob_biases" : 69,
      "name" : "input.66",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.65",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.69",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.69",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.69",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.68",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.70",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.72",
      "blob_weights" : 75,
      "K" : 16,
      "blob_biases" : 73,
      "name" : "input.70",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.69",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.73",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.73",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.73",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.72",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.74",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.76",
      "blob_weights" : 79,
      "K" : 16,
      "blob_biases" : 77,
      "name" : "input.74",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.73",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.77",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx6.1",
      "blob_weights" : 83,
      "K" : 16,
      "blob_biases" : 81,
      "name" : "input.77",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.76",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.79",
      "top" : "input.79",
      "type" : "concat",
      "name" : "input.79",
      "bottom" : "hx6.1,input.76"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.80",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.82",
      "blob_weights" : 87,
      "K" : 32,
      "blob_biases" : 85,
      "name" : "input.80",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.79",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx5dup.2",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.82",
      "debug_info" : "hx5dup.2",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx5dup.2",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.83",
      "top" : "input.83",
      "type" : "concat",
      "name" : "input.83",
      "bottom" : "hx5dup.2,input.72"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.84",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.86",
      "blob_weights" : 91,
      "K" : 32,
      "blob_biases" : 89,
      "name" : "input.84",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.83",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup.2",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.86",
      "debug_info" : "hx4dup.2",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.2",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.87",
      "top" : "input.87",
      "type" : "concat",
      "name" : "input.87",
      "bottom" : "hx4dup.2,input.68"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.88",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.90",
      "blob_weights" : 95,
      "K" : 32,
      "blob_biases" : 93,
      "name" : "input.88",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.87",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.2",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.90",
      "debug_info" : "hx3dup.2",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.2",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.91",
      "top" : "input.91",
      "type" : "concat",
      "name" : "input.91",
      "bottom" : "hx3dup.2,input.64"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.92",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.94",
      "blob_weights" : 99,
      "K" : 32,
      "blob_biases" : 97,
      "name" : "input.92",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.91",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.2",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.94",
      "debug_info" : "hx2dup.2",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.2",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.95",
      "top" : "input.95",
      "type" : "concat",
      "name" : "input.95",
      "bottom" : "hx2dup.2,input.60"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.96",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.2",
      "blob_weights" : 103,
      "K" : 32,
      "blob_biases" : 101,
      "name" : "input.96",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.95",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.57,hx1d.2",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.98",
      "top" : "input.98",
      "type" : "elementwise",
      "name" : "input.98",
      "beta" : 0
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.99",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.99",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.99",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.98",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.100",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.102",
      "blob_weights" : 107,
      "K" : 64,
      "blob_biases" : 105,
      "name" : "input.100",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.99",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.103",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.105",
      "blob_weights" : 111,
      "K" : 64,
      "blob_biases" : 109,
      "name" : "input.103",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.102",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.106",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.106",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.106",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.105",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.107",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.109",
      "blob_weights" : 115,
      "K" : 16,
      "blob_biases" : 113,
      "name" : "input.107",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.106",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.110",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.110",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.110",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.109",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.111",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.113",
      "blob_weights" : 119,
      "K" : 16,
      "blob_biases" : 117,
      "name" : "input.111",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.110",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.114",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.114",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.114",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.113",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.115",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.117",
      "blob_weights" : 123,
      "K" : 16,
      "blob_biases" : 121,
      "name" : "input.115",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.114",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.118",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx5.1",
      "blob_weights" : 127,
      "K" : 16,
      "blob_biases" : 125,
      "name" : "input.118",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.117",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.120",
      "top" : "input.120",
      "type" : "concat",
      "name" : "input.120",
      "bottom" : "hx5.1,input.117"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.121",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.123",
      "blob_weights" : 131,
      "K" : 32,
      "blob_biases" : 129,
      "name" : "input.121",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.120",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup.3",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.123",
      "debug_info" : "hx4dup.3",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.3",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.124",
      "top" : "input.124",
      "type" : "concat",
      "name" : "input.124",
      "bottom" : "hx4dup.3,input.113"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.125",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.127",
      "blob_weights" : 135,
      "K" : 32,
      "blob_biases" : 133,
      "name" : "input.125",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.124",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.3",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.127",
      "debug_info" : "hx3dup.3",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.3",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.128",
      "top" : "input.128",
      "type" : "concat",
      "name" : "input.128",
      "bottom" : "hx3dup.3,input.109"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.129",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.131",
      "blob_weights" : 139,
      "K" : 32,
      "blob_biases" : 137,
      "name" : "input.129",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.128",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.3",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.131",
      "debug_info" : "hx2dup.3",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.3",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.132",
      "top" : "input.132",
      "type" : "concat",
      "name" : "input.132",
      "bottom" : "hx2dup.3,input.105"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.133",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.3",
      "blob_weights" : 143,
      "K" : 32,
      "blob_biases" : 141,
      "name" : "input.133",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.132",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.102,hx1d.3",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.135",
      "top" : "input.135",
      "type" : "elementwise",
      "name" : "input.135",
      "beta" : 0
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.136",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.136",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.136",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.135",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.137",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.139",
      "blob_weights" : 147,
      "K" : 64,
      "blob_biases" : 145,
      "name" : "input.137",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.136",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.140",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.142",
      "blob_weights" : 151,
      "K" : 64,
      "blob_biases" : 149,
      "name" : "input.140",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.139",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.143",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.143",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.143",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.142",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.144",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.146",
      "blob_weights" : 155,
      "K" : 16,
      "blob_biases" : 153,
      "name" : "input.144",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.143",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.147",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.147",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.147",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.146",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.148",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.150",
      "blob_weights" : 159,
      "K" : 16,
      "blob_biases" : 157,
      "name" : "input.148",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.147",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.151",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx4.1",
      "blob_weights" : 163,
      "K" : 16,
      "blob_biases" : 161,
      "name" : "input.151",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.150",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.153",
      "top" : "input.153",
      "type" : "concat",
      "name" : "input.153",
      "bottom" : "hx4.1,input.150"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.154",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.156",
      "blob_weights" : 167,
      "K" : 32,
      "blob_biases" : 165,
      "name" : "input.154",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.153",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.4",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.156",
      "debug_info" : "hx3dup.4",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.4",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.157",
      "top" : "input.157",
      "type" : "concat",
      "name" : "input.157",
      "bottom" : "hx3dup.4,input.146"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.158",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.160",
      "blob_weights" : 171,
      "K" : 32,
      "blob_biases" : 169,
      "name" : "input.158",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.157",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.4",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.160",
      "debug_info" : "hx2dup.4",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.4",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.161",
      "top" : "input.161",
      "type" : "concat",
      "name" : "input.161",
      "bottom" : "hx2dup.4,input.142"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.162",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.4",
      "blob_weights" : 175,
      "K" : 32,
      "blob_biases" : 173,
      "name" : "input.162",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.161",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.139,hx1d.4",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.164",
      "top" : "input.164",
      "type" : "elementwise",
      "name" : "input.164",
      "beta" : 0
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.165",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.165",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.165",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.164",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.166",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.168",
      "blob_weights" : 179,
      "K" : 64,
      "blob_biases" : 177,
      "name" : "input.166",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.165",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.169",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.171",
      "blob_weights" : 183,
      "K" : 64,
      "blob_biases" : 181,
      "name" : "input.169",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.168",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.172",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "input.174",
      "blob_weights" : 187,
      "K" : 16,
      "blob_biases" : 185,
      "name" : "input.172",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.171",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.175",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "input.177",
      "blob_weights" : 191,
      "K" : 16,
      "blob_biases" : 189,
      "name" : "input.175",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.174",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "pad_r" : 8,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.178",
      "pad_fill_mode" : 0,
      "pad_b" : 8,
      "pad_l" : 8,
      "top" : "hx4.2",
      "blob_weights" : 195,
      "K" : 16,
      "blob_biases" : 193,
      "name" : "input.178",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 8,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.177",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 8,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 8
    },
    {
      "weights" : {

      },
      "debug_info" : "input.180",
      "top" : "input.180",
      "type" : "concat",
      "name" : "input.180",
      "bottom" : "hx4.2,input.177"
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.181",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "hx3d.1",
      "blob_weights" : 199,
      "K" : 32,
      "blob_biases" : 197,
      "name" : "input.181",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.180",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "weights" : {

      },
      "debug_info" : "input.183",
      "top" : "input.183",
      "type" : "concat",
      "name" : "input.183",
      "bottom" : "hx3d.1,input.174"
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.184",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx2d.1",
      "blob_weights" : 203,
      "K" : 32,
      "blob_biases" : 201,
      "name" : "input.184",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.183",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.186",
      "top" : "input.186",
      "type" : "concat",
      "name" : "input.186",
      "bottom" : "hx2d.1,input.171"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.187",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.5",
      "blob_weights" : 207,
      "K" : 32,
      "blob_biases" : 205,
      "name" : "input.187",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.186",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.168,hx1d.5",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.189",
      "top" : "input.189",
      "type" : "elementwise",
      "name" : "input.189",
      "beta" : 0
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.190",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.190",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.190",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.189",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.191",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.193",
      "blob_weights" : 211,
      "K" : 64,
      "blob_biases" : 209,
      "name" : "input.191",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.190",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.194",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.196",
      "blob_weights" : 215,
      "K" : 64,
      "blob_biases" : 213,
      "name" : "input.194",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.193",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.197",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "input.199",
      "blob_weights" : 219,
      "K" : 16,
      "blob_biases" : 217,
      "name" : "input.197",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.196",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.200",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "input.202",
      "blob_weights" : 223,
      "K" : 16,
      "blob_biases" : 221,
      "name" : "input.200",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.199",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "pad_r" : 8,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.203",
      "pad_fill_mode" : 0,
      "pad_b" : 8,
      "pad_l" : 8,
      "top" : "hx4.3",
      "blob_weights" : 227,
      "K" : 16,
      "blob_biases" : 225,
      "name" : "input.203",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 8,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.202",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 8,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 8
    },
    {
      "weights" : {

      },
      "debug_info" : "input.205",
      "top" : "input.205",
      "type" : "concat",
      "name" : "input.205",
      "bottom" : "hx4.3,input.202"
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.206",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "hx3d.2",
      "blob_weights" : 231,
      "K" : 32,
      "blob_biases" : 229,
      "name" : "input.206",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.205",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "weights" : {

      },
      "debug_info" : "input.208",
      "top" : "input.208",
      "type" : "concat",
      "name" : "input.208",
      "bottom" : "hx3d.2,input.199"
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.209",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx2d.2",
      "blob_weights" : 235,
      "K" : 32,
      "blob_biases" : 233,
      "name" : "input.209",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.208",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.211",
      "top" : "input.211",
      "type" : "concat",
      "name" : "input.211",
      "bottom" : "hx2d.2,input.196"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.212",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.6",
      "blob_weights" : 239,
      "K" : 32,
      "blob_biases" : 237,
      "name" : "input.212",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.211",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.193,hx1d.6",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.214",
      "top" : "input.214",
      "type" : "elementwise",
      "name" : "input.214",
      "beta" : 0
    },
    {
      "top" : "hx6up",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.214",
      "debug_info" : "hx6up",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx6up",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.215",
      "top" : "input.215",
      "type" : "concat",
      "name" : "input.215",
      "bottom" : "hx6up,input.189"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.216",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.218",
      "blob_weights" : 243,
      "K" : 128,
      "blob_biases" : 241,
      "name" : "input.216",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.215",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.219",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.221",
      "blob_weights" : 247,
      "K" : 64,
      "blob_biases" : 245,
      "name" : "input.219",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.218",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.222",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "input.224",
      "blob_weights" : 251,
      "K" : 16,
      "blob_biases" : 249,
      "name" : "input.222",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.221",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.225",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "input.227",
      "blob_weights" : 255,
      "K" : 16,
      "blob_biases" : 253,
      "name" : "input.225",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.224",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "pad_r" : 8,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.228",
      "pad_fill_mode" : 0,
      "pad_b" : 8,
      "pad_l" : 8,
      "top" : "hx4.4",
      "blob_weights" : 259,
      "K" : 16,
      "blob_biases" : 257,
      "name" : "input.228",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 8,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.227",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 8,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 8
    },
    {
      "weights" : {

      },
      "debug_info" : "input.230",
      "top" : "input.230",
      "type" : "concat",
      "name" : "input.230",
      "bottom" : "hx4.4,input.227"
    },
    {
      "pad_r" : 4,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.231",
      "pad_fill_mode" : 0,
      "pad_b" : 4,
      "pad_l" : 4,
      "top" : "hx3d",
      "blob_weights" : 263,
      "K" : 32,
      "blob_biases" : 261,
      "name" : "input.231",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 4,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.230",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 4,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 4
    },
    {
      "weights" : {

      },
      "debug_info" : "input.233",
      "top" : "input.233",
      "type" : "concat",
      "name" : "input.233",
      "bottom" : "hx3d,input.224"
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.234",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx2d",
      "blob_weights" : 267,
      "K" : 32,
      "blob_biases" : 265,
      "name" : "input.234",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.233",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.236",
      "top" : "input.236",
      "type" : "concat",
      "name" : "input.236",
      "bottom" : "hx2d,input.221"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.237",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.7",
      "blob_weights" : 271,
      "K" : 32,
      "blob_biases" : 269,
      "name" : "input.237",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.236",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.218,hx1d.7",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.239",
      "top" : "input.239",
      "type" : "elementwise",
      "name" : "input.239",
      "beta" : 0
    },
    {
      "top" : "hx5dup.3",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.239",
      "debug_info" : "hx5dup.3",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx5dup.3",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.240",
      "top" : "input.240",
      "type" : "concat",
      "name" : "input.240",
      "bottom" : "hx5dup.3,input.164"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.241",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.243",
      "blob_weights" : 275,
      "K" : 128,
      "blob_biases" : 273,
      "name" : "input.241",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.240",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.244",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.246",
      "blob_weights" : 279,
      "K" : 64,
      "blob_biases" : 277,
      "name" : "input.244",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.243",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.247",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.247",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.247",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.246",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.248",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.250",
      "blob_weights" : 283,
      "K" : 16,
      "blob_biases" : 281,
      "name" : "input.248",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.247",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.251",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.251",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.251",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.250",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.252",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.254",
      "blob_weights" : 287,
      "K" : 16,
      "blob_biases" : 285,
      "name" : "input.252",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.251",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.255",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx4",
      "blob_weights" : 291,
      "K" : 16,
      "blob_biases" : 289,
      "name" : "input.255",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.254",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.257",
      "top" : "input.257",
      "type" : "concat",
      "name" : "input.257",
      "bottom" : "hx4,input.254"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.258",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.260",
      "blob_weights" : 295,
      "K" : 32,
      "blob_biases" : 293,
      "name" : "input.258",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.257",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.5",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.260",
      "debug_info" : "hx3dup.5",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.5",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.261",
      "top" : "input.261",
      "type" : "concat",
      "name" : "input.261",
      "bottom" : "hx3dup.5,input.250"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.262",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.264",
      "blob_weights" : 299,
      "K" : 32,
      "blob_biases" : 297,
      "name" : "input.262",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.261",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.5",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.264",
      "debug_info" : "hx2dup.5",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.5",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.265",
      "top" : "input.265",
      "type" : "concat",
      "name" : "input.265",
      "bottom" : "hx2dup.5,input.246"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.266",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.8",
      "blob_weights" : 303,
      "K" : 32,
      "blob_biases" : 301,
      "name" : "input.266",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.265",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.243,hx1d.8",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.268",
      "top" : "input.268",
      "type" : "elementwise",
      "name" : "input.268",
      "beta" : 0
    },
    {
      "top" : "hx4dup.4",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.268",
      "debug_info" : "hx4dup.4",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.4",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.269",
      "top" : "input.269",
      "type" : "concat",
      "name" : "input.269",
      "bottom" : "hx4dup.4,input.135"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.270",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.272",
      "blob_weights" : 307,
      "K" : 128,
      "blob_biases" : 305,
      "name" : "input.270",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.269",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.273",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.275",
      "blob_weights" : 311,
      "K" : 64,
      "blob_biases" : 309,
      "name" : "input.273",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.272",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.276",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.276",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.276",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.275",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.277",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.279",
      "blob_weights" : 315,
      "K" : 16,
      "blob_biases" : 313,
      "name" : "input.277",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.276",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.280",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.280",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.280",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.279",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.281",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.283",
      "blob_weights" : 319,
      "K" : 16,
      "blob_biases" : 317,
      "name" : "input.281",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.280",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.284",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.284",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.284",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.283",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.285",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.287",
      "blob_weights" : 323,
      "K" : 16,
      "blob_biases" : 321,
      "name" : "input.285",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.284",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.288",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx5",
      "blob_weights" : 327,
      "K" : 16,
      "blob_biases" : 325,
      "name" : "input.288",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.287",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.290",
      "top" : "input.290",
      "type" : "concat",
      "name" : "input.290",
      "bottom" : "hx5,input.287"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.291",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.293",
      "blob_weights" : 331,
      "K" : 32,
      "blob_biases" : 329,
      "name" : "input.291",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.290",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup.5",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.293",
      "debug_info" : "hx4dup.5",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.5",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.294",
      "top" : "input.294",
      "type" : "concat",
      "name" : "input.294",
      "bottom" : "hx4dup.5,input.283"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.295",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.297",
      "blob_weights" : 335,
      "K" : 32,
      "blob_biases" : 333,
      "name" : "input.295",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.294",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.6",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.297",
      "debug_info" : "hx3dup.6",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.6",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.298",
      "top" : "input.298",
      "type" : "concat",
      "name" : "input.298",
      "bottom" : "hx3dup.6,input.279"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.299",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.301",
      "blob_weights" : 339,
      "K" : 32,
      "blob_biases" : 337,
      "name" : "input.299",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.298",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.6",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.301",
      "debug_info" : "hx2dup.6",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.6",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.302",
      "top" : "input.302",
      "type" : "concat",
      "name" : "input.302",
      "bottom" : "hx2dup.6,input.275"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.303",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.9",
      "blob_weights" : 343,
      "K" : 32,
      "blob_biases" : 341,
      "name" : "input.303",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.302",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.272,hx1d.9",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.305",
      "top" : "input.305",
      "type" : "elementwise",
      "name" : "input.305",
      "beta" : 0
    },
    {
      "top" : "hx3dup.7",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.305",
      "debug_info" : "hx3dup.7",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.7",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.306",
      "top" : "input.306",
      "type" : "concat",
      "name" : "input.306",
      "bottom" : "hx3dup.7,input.98"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.307",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.309",
      "blob_weights" : 347,
      "K" : 128,
      "blob_biases" : 345,
      "name" : "input.307",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.306",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.310",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.312",
      "blob_weights" : 351,
      "K" : 64,
      "blob_biases" : 349,
      "name" : "input.310",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.309",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.313",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.313",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.313",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.312",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.314",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.316",
      "blob_weights" : 355,
      "K" : 16,
      "blob_biases" : 353,
      "name" : "input.314",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.313",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.317",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.317",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.317",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.316",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.318",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.320",
      "blob_weights" : 359,
      "K" : 16,
      "blob_biases" : 357,
      "name" : "input.318",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.317",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.321",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.321",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.321",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.320",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.322",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.324",
      "blob_weights" : 363,
      "K" : 16,
      "blob_biases" : 361,
      "name" : "input.322",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.321",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.325",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.325",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.325",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.324",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.326",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.328",
      "blob_weights" : 367,
      "K" : 16,
      "blob_biases" : 365,
      "name" : "input.326",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.325",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.329",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx6",
      "blob_weights" : 371,
      "K" : 16,
      "blob_biases" : 369,
      "name" : "input.329",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.328",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.331",
      "top" : "input.331",
      "type" : "concat",
      "name" : "input.331",
      "bottom" : "hx6,input.328"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.332",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.334",
      "blob_weights" : 375,
      "K" : 32,
      "blob_biases" : 373,
      "name" : "input.332",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.331",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx5dup.4",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.334",
      "debug_info" : "hx5dup.4",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx5dup.4",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.335",
      "top" : "input.335",
      "type" : "concat",
      "name" : "input.335",
      "bottom" : "hx5dup.4,input.324"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.336",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.338",
      "blob_weights" : 379,
      "K" : 32,
      "blob_biases" : 377,
      "name" : "input.336",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.335",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup.6",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.338",
      "debug_info" : "hx4dup.6",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup.6",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.339",
      "top" : "input.339",
      "type" : "concat",
      "name" : "input.339",
      "bottom" : "hx4dup.6,input.320"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.340",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.342",
      "blob_weights" : 383,
      "K" : 32,
      "blob_biases" : 381,
      "name" : "input.340",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.339",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup.8",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.342",
      "debug_info" : "hx3dup.8",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup.8",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.343",
      "top" : "input.343",
      "type" : "concat",
      "name" : "input.343",
      "bottom" : "hx3dup.8,input.316"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.344",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.346",
      "blob_weights" : 387,
      "K" : 32,
      "blob_biases" : 385,
      "name" : "input.344",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.343",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup.7",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.346",
      "debug_info" : "hx2dup.7",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.7",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.347",
      "top" : "input.347",
      "type" : "concat",
      "name" : "input.347",
      "bottom" : "hx2dup.7,input.312"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.348",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d.10",
      "blob_weights" : 391,
      "K" : 32,
      "blob_biases" : 389,
      "name" : "input.348",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.347",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.309,hx1d.10",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.350",
      "top" : "input.350",
      "type" : "elementwise",
      "name" : "input.350",
      "beta" : 0
    },
    {
      "top" : "hx2dup.8",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.350",
      "debug_info" : "hx2dup.8",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup.8",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.351",
      "top" : "input.351",
      "type" : "concat",
      "name" : "input.351",
      "bottom" : "hx2dup.8,input.53"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.352",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.354",
      "blob_weights" : 395,
      "K" : 128,
      "blob_biases" : 393,
      "name" : "input.352",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.351",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.355",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.357",
      "blob_weights" : 399,
      "K" : 64,
      "blob_biases" : 397,
      "name" : "input.355",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.354",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.358",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.358",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.358",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.357",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.359",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.361",
      "blob_weights" : 403,
      "K" : 16,
      "blob_biases" : 401,
      "name" : "input.359",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.358",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.362",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.362",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.362",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.361",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.363",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.365",
      "blob_weights" : 407,
      "K" : 16,
      "blob_biases" : 405,
      "name" : "input.363",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.362",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.366",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.366",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.366",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.365",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.367",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.369",
      "blob_weights" : 411,
      "K" : 16,
      "blob_biases" : 409,
      "name" : "input.367",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.366",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.370",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.370",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.370",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.369",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.371",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.373",
      "blob_weights" : 415,
      "K" : 16,
      "blob_biases" : 413,
      "name" : "input.371",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.370",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 0,
      "debug_info" : "input.374",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "size_x" : 2,
      "top" : "input.374",
      "top_shape_style" : 0,
      "stride_x" : 2,
      "avg_or_max" : 1,
      "average_count_exclude_padding" : 1,
      "type" : "pool",
      "name" : "input.374",
      "pad_t" : 0,
      "stride_y" : 2,
      "bottom" : "input.373",
      "weights" : {

      },
      "pad_mode" : 2,
      "size_y" : 2,
      "pad_value" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.375",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.377",
      "blob_weights" : 419,
      "K" : 16,
      "blob_biases" : 417,
      "name" : "input.375",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.374",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 2,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.378",
      "pad_fill_mode" : 0,
      "pad_b" : 2,
      "pad_l" : 2,
      "top" : "hx7",
      "blob_weights" : 423,
      "K" : 16,
      "blob_biases" : 421,
      "name" : "input.378",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 2,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.377",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "dilation_x" : 2,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1,
      "dilation_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.380",
      "top" : "input.380",
      "type" : "concat",
      "name" : "input.380",
      "bottom" : "hx7,input.377"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.381",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.383",
      "blob_weights" : 427,
      "K" : 32,
      "blob_biases" : 425,
      "name" : "input.381",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.380",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx6dup",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.383",
      "debug_info" : "hx6dup",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx6dup",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.384",
      "top" : "input.384",
      "type" : "concat",
      "name" : "input.384",
      "bottom" : "hx6dup,input.373"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.385",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.387",
      "blob_weights" : 431,
      "K" : 32,
      "blob_biases" : 429,
      "name" : "input.385",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.384",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx5dup",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.387",
      "debug_info" : "hx5dup",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx5dup",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.388",
      "top" : "input.388",
      "type" : "concat",
      "name" : "input.388",
      "bottom" : "hx5dup,input.369"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.389",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.391",
      "blob_weights" : 435,
      "K" : 32,
      "blob_biases" : 433,
      "name" : "input.389",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.388",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx4dup",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.391",
      "debug_info" : "hx4dup",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx4dup",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.392",
      "top" : "input.392",
      "type" : "concat",
      "name" : "input.392",
      "bottom" : "hx4dup,input.365"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.393",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.395",
      "blob_weights" : 439,
      "K" : 32,
      "blob_biases" : 437,
      "name" : "input.393",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.392",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx3dup",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.395",
      "debug_info" : "hx3dup",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx3dup",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.396",
      "top" : "input.396",
      "type" : "concat",
      "name" : "input.396",
      "bottom" : "hx3dup,input.361"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.397",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.399",
      "blob_weights" : 443,
      "K" : 32,
      "blob_biases" : 441,
      "name" : "input.397",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 16,
      "bottom" : "input.396",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "hx2dup",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.399",
      "debug_info" : "hx2dup",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "hx2dup",
      "scaling_factor_y" : 2
    },
    {
      "weights" : {

      },
      "debug_info" : "input.400",
      "top" : "input.400",
      "type" : "concat",
      "name" : "input.400",
      "bottom" : "hx2dup,input.357"
    },
    {
      "pad_r" : 1,
      "fused_relu" : 1,
      "fused_tanh" : 0,
      "debug_info" : "input.401",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "hx1d",
      "blob_weights" : 447,
      "K" : 32,
      "blob_biases" : 445,
      "name" : "input.401",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 64,
      "bottom" : "input.400",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "bottom" : "input.354,hx1d",
      "alpha" : 1,
      "operation" : 0,
      "weights" : {

      },
      "fused_relu" : 0,
      "debug_info" : "input.403",
      "top" : "input.403",
      "type" : "elementwise",
      "name" : "input.403",
      "beta" : 0
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "tar",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "tar",
      "blob_weights" : 451,
      "K" : 64,
      "blob_biases" : 449,
      "name" : "tar",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.403",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input.404",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.404",
      "blob_weights" : 455,
      "K" : 64,
      "blob_biases" : 453,
      "name" : "input.404",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.350",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "d2",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 2,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.404",
      "debug_info" : "d2",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "d2",
      "scaling_factor_y" : 2
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input.405",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.405",
      "blob_weights" : 459,
      "K" : 64,
      "blob_biases" : 457,
      "name" : "input.405",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.305",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "d3",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 4,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.405",
      "debug_info" : "d3",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "d3",
      "scaling_factor_y" : 4
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input.406",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.406",
      "blob_weights" : 463,
      "K" : 64,
      "blob_biases" : 461,
      "name" : "input.406",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.268",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "d4",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 8,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.406",
      "debug_info" : "d4",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "d4",
      "scaling_factor_y" : 8
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input.407",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.407",
      "blob_weights" : 467,
      "K" : 64,
      "blob_biases" : 465,
      "name" : "input.407",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.239",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "d5",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 16,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.407",
      "debug_info" : "d5",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "d5",
      "scaling_factor_y" : 16
    },
    {
      "pad_r" : 1,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input.408",
      "pad_fill_mode" : 0,
      "pad_b" : 1,
      "pad_l" : 1,
      "top" : "input.408",
      "blob_weights" : 471,
      "K" : 64,
      "blob_biases" : 469,
      "name" : "input.408",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 1,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.214",
      "weights" : {

      },
      "Nx" : 3,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 3,
      "n_parallel" : 1
    },
    {
      "top" : "d6",
      "use_fractional_scale_factors" : false,
      "weights" : {

      },
      "fractional_scaling_factor_y" : 1,
      "type" : "upsample",
      "scaling_factor_x" : 32,
      "mode" : 1,
      "align_corners" : 0,
      "bottom" : "input.408",
      "debug_info" : "d6",
      "fractional_scaling_factor_x" : 1,
      "is_legacy_mode" : 0,
      "name" : "d6",
      "scaling_factor_y" : 32
    },
    {
      "weights" : {

      },
      "debug_info" : "input.409",
      "top" : "input.409",
      "type" : "concat",
      "name" : "input.409",
      "bottom" : "tar,d2,d3,d4,d5,d6"
    },
    {
      "pad_r" : 0,
      "fused_relu" : 0,
      "fused_tanh" : 0,
      "debug_info" : "input",
      "pad_fill_mode" : 0,
      "pad_b" : 0,
      "pad_l" : 0,
      "top" : "input",
      "blob_weights" : 475,
      "K" : 6,
      "blob_biases" : 473,
      "name" : "input",
      "has_batch_norm" : 0,
      "type" : "convolution",
      "n_groups" : 1,
      "pad_t" : 0,
      "has_biases" : 1,
      "C" : 1,
      "bottom" : "input.409",
      "weights" : {

      },
      "Nx" : 1,
      "pad_mode" : 0,
      "pad_value" : 0,
      "Ny" : 1,
      "n_parallel" : 1
    },
    {
      "bottom" : "input",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2169",
      "top" : "out_a0",
      "type" : "activation",
      "name" : "2169"
    },
    {
      "bottom" : "tar",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2170",
      "top" : "out_a1",
      "type" : "activation",
      "name" : "2170"
    },
    {
      "bottom" : "d2",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2171",
      "top" : "out_a2",
      "type" : "activation",
      "name" : "2171"
    },
    {
      "bottom" : "d3",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2172",
      "top" : "out_a3",
      "type" : "activation",
      "name" : "2172"
    },
    {
      "bottom" : "d4",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2173",
      "top" : "out_a4",
      "type" : "activation",
      "name" : "2173"
    },
    {
      "bottom" : "d5",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2174",
      "top" : "out_a5",
      "type" : "activation",
      "name" : "2174"
    },
    {
      "bottom" : "d6",
      "weights" : {

      },
      "mode" : 3,
      "debug_info" : "2175",
      "top" : "out_a6",
      "type" : "activation",
      "name" : "2175"
    },
    {
      "bottom" : "out_a0",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p0",
      "top" : "out_p0",
      "type" : "activation",
      "name" : "out_p0",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a1",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p1",
      "top" : "out_p1",
      "type" : "activation",
      "name" : "out_p1",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a2",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p2",
      "top" : "out_p2",
      "type" : "activation",
      "name" : "out_p2",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a3",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p3",
      "top" : "out_p3",
      "type" : "activation",
      "name" : "out_p3",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a4",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p4",
      "top" : "out_p4",
      "type" : "activation",
      "name" : "out_p4",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a5",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p5",
      "top" : "out_p5",
      "type" : "activation",
      "name" : "out_p5",
      "attributes" : {
        "is_output" : 1
      }
    },
    {
      "bottom" : "out_a6",
      "alpha" : 255,
      "beta" : 0,
      "mode" : 6,
      "weights" : {

      },
      "debug_info" : "out_p6",
      "top" : "out_p6",
      "type" : "activation",
      "name" : "out_p6",
      "attributes" : {
        "is_output" : 1
      }
    }
  ],
  "transform_params" : {
    "in_0" : {
      "bias_a" : 0,
      "bias_g" : 0,
      "bias_r" : 0,
      "bias_b" : 0,
      "center_mean" : 0,
      "is_network_bgr" : 0,
      "scale" : 0.0039215688593685627
    }
  },
  "storage" : "model.espresso.weights",
  "metadata_in_weights" : [

  ],
  "properties" : {

  },
  "analyses" : {

  },
  "format_version" : 200
}

================================================
FILE: Sources/SemanticImage/segmentation.mlmodelc/model.espresso.shape
================================================
{
  "layer_shapes" : {
    "input.95" : {
      "k" : 32,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.354" : {
      "k" : 64,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.41" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.369" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.383" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.403" : {
      "k" : 64,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "tar" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.16" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx4.4" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.208" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx5dup.4" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.251" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.46" : {
      "k" : 32,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.280" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx6dup.1" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "out_p6" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.76" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx6dup" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.373" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.105" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.388" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.8" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.408" : {
      "k" : 1,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx2dup.1" : {
      "k" : 16,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.227" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx5.1" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.27" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx1d.2" : {
      "k" : 64,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.82" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.305" : {
      "k" : 64,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx2dup.6" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.57" : {
      "k" : 64,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.334" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx1d.10" : {
      "k" : 64,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.392" : {
      "k" : 32,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.124" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.139" : {
      "k" : 64,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.87" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx3d" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.33" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx3dup.3" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.168" : {
      "k" : 64,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.153" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.202" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.246" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.260" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.275" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx3dup.8" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.38" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.324" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.339" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.114" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx4dup.5" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.68" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.143" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx1d.3" : {
      "k" : 64,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx2d" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.221" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx5dup.2" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.98" : {
      "k" : 64,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.236" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.250" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.265" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.294" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.19" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.343" : {
      "k" : 32,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.20" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.358" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.387" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.4" : {
      "k" : 64,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.49" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.407" : {
      "k" : 1,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.50" : {
      "k" : 32,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.177" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.211" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.79" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.240" : {
      "k" : 128,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx4dup" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx1d" : {
      "k" : 64,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.284" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx2dup.4" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx1d.4" : {
      "k" : 64,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.362" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.377" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.391" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.123" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.109" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx3dup.1" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "hx6.1" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "out_a0" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.196" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.230" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.61" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx3dup.6" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.309" : {
      "k" : 64,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.91" : {
      "k" : 32,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.338" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.113" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx4dup.3" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx2d.1" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.396" : {
      "k" : 32,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.142" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.128" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.12" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.157" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.171" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.186" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx1d.5" : {
      "k" : 64,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.42" : {
      "k" : 32,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.264" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.279" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.293" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.313" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.72" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.328" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.342" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "out_a1" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.357" : {
      "k" : 16,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "out_p0" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.132" : {
      "k" : 32,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.406" : {
      "k" : 1,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.147" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.161" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.190" : {
      "k" : 64,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.23" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.254" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.269" : {
      "k" : 128,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.283" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.298" : {
      "k" : 32,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "hx2d.2" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx2dup.2" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.53" : {
      "k" : 64,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.347" : {
      "k" : 32,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.361" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.83" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx1d.6" : {
      "k" : 64,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx2dup" : {
      "k" : 16,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.180" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx2dup.7" : {
      "k" : 16,
      "w" : 160,
      "n" : 1,
      "_rank" : 4,
      "h" : 160
    },
    "input.215" : {
      "k" : 128,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "out_a2" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "out_p1" : {
      "k" : 1,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "hx3dup.4" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.34" : {
      "k" : 32,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "hx7.1" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.351" : {
      "k" : 128,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "in_0" : {
      "k" : 3,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.366" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.380" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "hx4dup.1" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.64" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.127" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.400" : {
      "k" : 32,
      "w" : 320,
      "n" : 1,
      "_rank" : 4,
      "h" : 320
    },
    "input.395" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "input.156" : {
      "k" : 16,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.205" : {
      "k" : 32,
      "w" : 10,
      "n" : 1,
      "_rank" : 4,
      "h" : 10
    },
    "input.94" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" : 80
    },
    "hx4dup.6" : {
      "k" : 16,
      "w" : 40,
      "n" : 1,
      "_rank" : 4,
      "h" : 40
    },
    "input.69" : {
      "k" : 16,
      "w" : 20,
      "n" : 1,
      "_rank" : 4,
      "h" : 20
    },
    "input.15" : {
      "k" : 16,
      "w" : 80,
      "n" : 1,
      "_rank" : 4,
      "h" 
Download .txt
gitextract_0eo7rbyt/

├── .gitignore
├── .swiftpm/
│   └── xcode/
│       └── package.xcworkspace/
│           └── xcshareddata/
│               └── IDEWorkspaceChecks.plist
├── LICENSE
├── Package.swift
├── README.md
├── Sources/
│   └── SemanticImage/
│       ├── SemanticImage.swift
│       ├── segmentation.mlmodelc/
│       │   ├── metadata.json
│       │   ├── model.espresso.net
│       │   ├── model.espresso.shape
│       │   └── model.espresso.weights
│       └── segmentation.swift
└── Tests/
    └── SemanticImageTests/
        └── SemanticImageTests.swift
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (249K chars).
[
  {
    "path": ".gitignore",
    "chars": 126,
    "preview": ".DS_Store\n/.build\n/Packages\n/*.xcodeproj\nxcuserdata/\nDerivedData/\n.swiftpm/xcode/package.xcworkspace/contents.xcworkspac"
  },
  {
    "path": ".swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "chars": 238,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "LICENSE",
    "chars": 1062,
    "preview": "MIT License\n\nCopyright (c) 2021 MLBoy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t"
  },
  {
    "path": "Package.swift",
    "chars": 1155,
    "preview": "// swift-tools-version:5.5\n// The swift-tools-version declares the minimum version of Swift required to build this packa"
  },
  {
    "path": "README.md",
    "chars": 9327,
    "preview": "# SemanticImage\n\n**Plug-and-play image/video filters built on Vision + CoreML + CoreImage — for iOS. Person segmentation"
  },
  {
    "path": "Sources/SemanticImage/SemanticImage.swift",
    "chars": 42812,
    "preview": "import Foundation\nimport Vision\nimport UIKit\nimport AVKit\n\npublic class SemanticImage {\n    \n    public init() {\n    }\n "
  },
  {
    "path": "Sources/SemanticImage/segmentation.mlmodelc/metadata.json",
    "chars": 3671,
    "preview": "[\n  {\n    \"metadataOutputVersion\" : \"3.0\",\n    \"storagePrecision\" : \"Float32\",\n    \"outputSchema\" : [\n      {\n        \"h"
  },
  {
    "path": "Sources/SemanticImage/segmentation.mlmodelc/model.espresso.net",
    "chars": 122998,
    "preview": "{\n  \"layers\" : [\n    {\n      \"pad_r\" : 1,\n      \"fused_relu\" : 1,\n      \"fused_tanh\" : 0,\n      \"debug_info\" : \"input.2\""
  },
  {
    "path": "Sources/SemanticImage/segmentation.mlmodelc/model.espresso.shape",
    "chars": 28671,
    "preview": "{\n  \"layer_shapes\" : {\n    \"input.95\" : {\n      \"k\" : 32,\n      \"w\" : 160,\n      \"n\" : 1,\n      \"_rank\" : 4,\n      \"h\" :"
  },
  {
    "path": "Sources/SemanticImage/segmentation.swift",
    "chars": 12486,
    "preview": "//\n// segmentation.swift\n//\n// This file was automatically generated and should not be edited.\n//\n\nimport CoreML\n\n\n/// M"
  },
  {
    "path": "Tests/SemanticImageTests/SemanticImageTests.swift",
    "chars": 360,
    "preview": "import XCTest\n@testable import SemanticImage\n\nfinal class SemanticImageTests: XCTestCase {\n    func testExample() throws"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the john-rocky/SemanticImage GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (217.7 KB), approximately 77.1k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!