| /** |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package singa; |
| |
| option java_package = "org.apache.singa.proto"; |
| |
| message EncoderConf { |
| optional string type = 1 [default = "jpg2proto"]; |
| optional string image_dim_order = 2 [default = "HWC"]; |
| } |
| |
| message DecoderConf { |
| optional string type = 1 [default = "proto2jpg"]; |
| optional string image_dim_order = 2 [default = "CHW"]; |
| optional bool has_label = 3 [default = true]; |
| } |
| |
| message TransformerConf { |
| optional bool featurewise_center = 1 [default = false]; |
| optional bool samplewise_center = 2 [default = false]; |
| optional bool featurewise_std_norm = 3 [default = false]; |
| optional bool samplewise_std_norm = 4 [default = false]; |
| optional bool zca_whitening = 5 [default = false]; |
| optional int32 rotation_range = 6 [default = 0]; |
| /// crop_shape should exactly contain 2 elements in order, |
| /// i.e., crop_height, crop_width. |
| repeated uint32 crop_shape = 7 [packed = true]; |
| optional int32 resize_height = 8 [default = 0]; |
| optional int32 resize_width = 9 [default = 0]; |
| optional bool horizontal_mirror = 10 [default = false]; |
| optional bool vertical_mirror = 11 [default = false]; |
| /// if input tensor is 4D or 3D, |
| /// supported shape of inputs are "CHW" and "HWC". |
| /// if input tensor is 2D, this field will be ignored. |
| optional string image_dim_order = 12 [default = "CHW"]; |
| optional float rescale = 13 [default = 0]; |
| } |
| |
| message ImageRecord { |
| repeated int32 shape = 1; |
| repeated int32 label = 2; |
| optional bytes pixel = 3; |
| } |