# -*- coding: utf-8 -*-
import numpy as np #numpy is used for a parameter input
from steganogan import SteganoGAN
from steganogan.loader import DataLoader
from steganogan.encoders import BasicEncoder, DenseEncoder
from steganogan.decoders import BasicDecoder, DenseDecoder
from steganogan.critics import BasicCritic

# Load the data
train = DataLoader('D:/dataset/train/', limit=np.inf, shuffle=True, batch_size=4)
validation = DataLoader('D:/dataset/val/', limit=np.inf, shuffle=True, batch_size=4)

# Create the SteganoGAN instance
steganogan = SteganoGAN(1, BasicEncoder, BasicDecoder, BasicCritic, hidden_size=32, cuda=True, verbose=True)

# Fit on the given data
# steganogan.fit(train, validation, epochs=5)

steganogan = SteganoGAN.load(architecture='demo', path=None, cuda=True, verbose=True)

# Encode a message in input.png
steganogan.encode('research/input.png', 'output.png', 'This is a super secret message')

# Decode the message from output.png
steganogan.decode('research/output.png')


# -*- coding: utf-8 -*-
import numpy as np #numpy is used for a parameter input
from steganogan import SteganoGAN
from steganogan.loader import DataLoader
from steganogan.encoders import BasicEncoder, DenseEncoder
from steganogan.decoders import BasicDecoder, DenseDecoder
from steganogan.critics import BasicCritic

# Load the data
train = DataLoader('D:/dataset/train/', limit=np.inf, shuffle=True, batch_size=4)
validation = DataLoader('D:/dataset/val/', limit=np.inf, shuffle=True, batch_size=4)

# Create the SteganoGAN instance
steganogan = SteganoGAN(1, BasicEncoder, BasicDecoder, BasicCritic, hidden_size=32, cuda=True, verbose=True)

# Fit on the given data
# steganogan.fit(train, validation, epochs=5)

steganogan = SteganoGAN.load(architecture='demo', path=None, cuda=True, verbose=True)

# Encode a message in input.png
steganogan.encode('research/input.png', 'output.png', 'This is a super secret message')

# Decode the message from output.png
steganogan.decode('research/output.png')


# -*- coding: utf-8 -*- #numpy is used for a parameter input # Load the data # Create the SteganoGAN instance # Fit on the given data # steganogan.fit(train, validation, epochs=5) # Encode a message in input.png # Decode the message from output.png