Working version. Training, updation, testing and writing binary image outputs done. Added code to create outputs directory automatically.