1 /**
2 * Copyright 2021 Huawei Technologies Co., Ltd
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 #include "minddata/dataset/engine/datasetops/source/caltech_op.h"
17
18 #include <map>
19 #include <memory>
20 #include <set>
21 #include <utility>
22
23 namespace mindspore {
24 namespace dataset {
25 const std::set<std::string> kExts = {".jpg", ".JPEG"};
26 const std::map<std::string, int32_t> kClassIndex = {};
CaltechOp(int32_t num_workers,const std::string & file_dir,int32_t queue_size,bool do_decode,std::unique_ptr<DataSchema> data_schema,std::shared_ptr<SamplerRT> sampler)27 CaltechOp::CaltechOp(int32_t num_workers, const std::string &file_dir, int32_t queue_size, bool do_decode,
28 std::unique_ptr<DataSchema> data_schema, std::shared_ptr<SamplerRT> sampler)
29 : ImageFolderOp(num_workers, file_dir, queue_size, false, do_decode, kExts, kClassIndex, std::move(data_schema),
30 std::move(sampler)) {}
31 } // namespace dataset
32 } // namespace mindspore
33