Пример #1
0
        void LoadImage(ImageManipulationModels imageManipulationModels, AiliaImageSource ailiaImageSource)
        {
            switch (imageManipulationModels)
            {
            case ImageManipulationModels.SRResNet:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageManipulation/SampleImage/lenna.png");
                break;

            case ImageManipulationModels.Noise2Noise:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageManipulation/SampleImage/monarch-gaussian-noisy.png");
                break;

            case ImageManipulationModels.IlluminationCorrection:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageManipulation/SampleImage/illumination_correction_test.png");
                break;

            case ImageManipulationModels.Colorization:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageManipulation/SampleImage/ansel_adams1.png");
                break;
            }
        }
        void AiliaInit()
        {
            // Create Ailia
            ailiaModelVgg     = new AiliaModel();
            ailiaModelDecoder = new AiliaModel();
            CreateAdainNet(ailiaModelVgg, ailiaModelDecoder, gpu_mode);

            // Load sample image
            ContentImageSource = gameObject.AddComponent <AiliaImageSource>();
            StyleImageSource   = gameObject.AddComponent <AiliaImageSource>();
            ContentImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/Adain/SampleImage/cornell.jpg");
            StyleImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/Adain/SampleImage/woman_with_hat_matisse.jpg");
        }
        void LoadImage(ImageSegmentaionModels imageSegmentaionModels, AiliaImageSource ailiaImageSource)
        {
            switch (imageSegmentaionModels)
            {
            case ImageSegmentaionModels.HRNetV2_W18_Small_v2:
            case ImageSegmentaionModels.HRNetV2_W18_Small_v1:
            case ImageSegmentaionModels.HRNetV2_W48:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageSegmentation/SampleImage/road.png");
                break;

            case ImageSegmentaionModels.hair_segmentation:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageSegmentation/SampleImage/hair.jpg");
                break;

            case ImageSegmentaionModels.pspnet_hair_segmentation:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageSegmentation/SampleImage/hair2.jpg");
                break;

            case ImageSegmentaionModels.deeplabv3:
                ailiaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageSegmentation/SampleImage/couple.jpg");
                break;
            }
        }
Пример #4
0
        void AiliaInit()
        {
            // Create Ailia
            ailiaModelWC = new AiliaModel();
            ailiaModelBM = new AiliaModel();
            CreateDewarpNet(ailiaModelWC, ailiaModelBM, gpu_mode);

            // Load sample image
            AiliaImageSource = gameObject.GetComponent <AiliaImageSource>();
            if (AiliaImageSource == null)
            {
                AiliaImageSource = gameObject.AddComponent <AiliaImageSource>();
            }
            AiliaImageSource.CreateSource("file://" + Application.dataPath + "/AXIP/AILIA-MODELS/ImageDeformation/SampleImage/dewarpnet_test.png");
        }