提交 ab031ee9 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1126 VOCDataset support object detection function

Merge pull request !1126 from xiefangqi/voc_support_detection
set(tinyxml2_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2 -Wno-unused-result")
set(tinyxml2_CFLAGS "-D_FORTIFY_SOURCE=2 -O2")
mindspore_add_pkg(tinyxml2
VER 8.0.0
LIBS tinyxml2
URL https://github.com/leethomason/tinyxml2/archive/8.0.0.tar.gz
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release
MD5 5dc535c8b34ee621fe2128f072d275b5)
include_directories(${tinyxml2_INC})
add_library(mindspore::tinyxml2 ALIAS tinyxml2::tinyxml2)
...@@ -56,6 +56,7 @@ if (ENABLE_MINDDATA) ...@@ -56,6 +56,7 @@ if (ENABLE_MINDDATA)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/libtiff.cmake) include(${CMAKE_SOURCE_DIR}/cmake/external_libs/libtiff.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/opencv.cmake) include(${CMAKE_SOURCE_DIR}/cmake/external_libs/opencv.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/sqlite.cmake) include(${CMAKE_SOURCE_DIR}/cmake/external_libs/sqlite.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/tinyxml2.cmake)
endif() endif()
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/gtest.cmake) include(${CMAKE_SOURCE_DIR}/cmake/external_libs/gtest.cmake)
......
...@@ -39,6 +39,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows") ...@@ -39,6 +39,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(opencv_LIBPATH ${opencv_LIBPATH}/../bin/) set(opencv_LIBPATH ${opencv_LIBPATH}/../bin/)
set(jpeg_turbo_LIBPATH ${jpeg_turbo_LIBPATH}/../bin/) set(jpeg_turbo_LIBPATH ${jpeg_turbo_LIBPATH}/../bin/)
set(sqlite_LIBPATH ${sqlite_LIBPATH}/../bin/) set(sqlite_LIBPATH ${sqlite_LIBPATH}/../bin/)
set(tinyxml2_LIBPATH ${tinyxml2_LIBPATH}/../bin/)
else () else ()
set(INSTALL_LIB_DIR "lib") set(INSTALL_LIB_DIR "lib")
endif () endif ()
...@@ -82,6 +83,15 @@ if (ENABLE_MINDDATA) ...@@ -82,6 +83,15 @@ if (ENABLE_MINDDATA)
DESTINATION ${INSTALL_LIB_DIR} DESTINATION ${INSTALL_LIB_DIR}
COMPONENT mindspore COMPONENT mindspore
) )
file(GLOB_RECURSE TINYXML2_LIB_LIST
${tinyxml2_LIBPATH}/libtinyxml2*
)
install(
FILES ${TINYXML2_LIB_LIST}
DESTINATION ${INSTALL_LIB_DIR}
COMPONENT mindspore
)
endif () endif ()
if (ENABLE_CPU) if (ENABLE_CPU)
......
...@@ -89,7 +89,7 @@ else() ...@@ -89,7 +89,7 @@ else()
target_link_libraries(_c_dataengine PRIVATE mindspore::pybind11_module -ldl mindspore::protobuf ${SECUREC_LIBRARY}) target_link_libraries(_c_dataengine PRIVATE mindspore::pybind11_module -ldl mindspore::protobuf ${SECUREC_LIBRARY})
endif() endif()
target_link_libraries(_c_dataengine PUBLIC mindspore::jpeg_turbo mindspore::opencv_core mindspore::opencv_imgcodecs target_link_libraries(_c_dataengine PUBLIC mindspore::jpeg_turbo mindspore::opencv_core mindspore::opencv_imgcodecs
mindspore::opencv_imgproc) mindspore::opencv_imgproc mindspore::tinyxml2)
if (ENABLE_GPUQUE) if (ENABLE_GPUQUE)
target_link_libraries(_c_dataengine PRIVATE gpu_queue target_link_libraries(_c_dataengine PRIVATE gpu_queue
${CUDNN_PATH}/lib64/libcudnn.so ${CUDNN_PATH}/lib64/libcudnn.so
......
...@@ -903,6 +903,8 @@ Status DEPipeline::ParseVOCOp(const py::dict &args, std::shared_ptr<DatasetOp> * ...@@ -903,6 +903,8 @@ Status DEPipeline::ParseVOCOp(const py::dict &args, std::shared_ptr<DatasetOp> *
std::shared_ptr<VOCOp::Builder> builder = std::make_shared<VOCOp::Builder>(); std::shared_ptr<VOCOp::Builder> builder = std::make_shared<VOCOp::Builder>();
(void)builder->SetDir(ToString(args["dataset_dir"])); (void)builder->SetDir(ToString(args["dataset_dir"]));
(void)builder->SetTask(ToString(args["task"]));
(void)builder->SetMode(ToString(args["mode"]));
for (auto arg : args) { for (auto arg : args) {
std::string key = py::str(arg.first); std::string key = py::str(arg.first);
py::handle value = arg.second; py::handle value = arg.second;
...@@ -917,6 +919,8 @@ Status DEPipeline::ParseVOCOp(const py::dict &args, std::shared_ptr<DatasetOp> * ...@@ -917,6 +919,8 @@ Status DEPipeline::ParseVOCOp(const py::dict &args, std::shared_ptr<DatasetOp> *
(void)builder->SetSampler(std::move(sampler)); (void)builder->SetSampler(std::move(sampler));
} else if (key == "decode") { } else if (key == "decode") {
(void)builder->SetDecode(ToBool(value)); (void)builder->SetDecode(ToBool(value));
} else if (key == "class_indexing") {
(void)builder->SetClassIndex(ToStringMap(value));
} }
} }
} }
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "dataset/engine/datasetops/source/tf_reader_op.h" #include "dataset/engine/datasetops/source/tf_reader_op.h"
#include "dataset/engine/jagged_connector.h" #include "dataset/engine/jagged_connector.h"
#include "dataset/engine/datasetops/source/text_file_op.h" #include "dataset/engine/datasetops/source/text_file_op.h"
#include "dataset/engine/datasetops/source/voc_op.h"
#include "dataset/kernels/data/to_float16_op.h" #include "dataset/kernels/data/to_float16_op.h"
#include "dataset/util/random.h" #include "dataset/util/random.h"
#include "mindrecord/include/shard_operator.h" #include "mindrecord/include/shard_operator.h"
...@@ -194,6 +195,13 @@ void bindDatasetOps(py::module *m) { ...@@ -194,6 +195,13 @@ void bindDatasetOps(py::module *m) {
THROW_IF_ERROR(TextFileOp::CountAllFileRows(filenames, &count)); THROW_IF_ERROR(TextFileOp::CountAllFileRows(filenames, &count));
return count; return count;
}); });
(void)py::class_<VOCOp, DatasetOp, std::shared_ptr<VOCOp>>(*m, "VOCOp")
.def_static("get_class_indexing", [](const std::string &dir, const std::string &task_type,
const std::string &task_mode, const py::dict &dict, int64_t numSamples) {
std::map<std::string, int32_t> output_class_indexing;
THROW_IF_ERROR(VOCOp::GetClassIndexing(dir, task_type, task_mode, dict, numSamples, &output_class_indexing));
return output_class_indexing;
});
} }
void bindTensor(py::module *m) { void bindTensor(py::module *m) {
(void)py::class_<GlobalContext>(*m, "GlobalContext") (void)py::class_<GlobalContext>(*m, "GlobalContext")
......
...@@ -15,8 +15,10 @@ ...@@ -15,8 +15,10 @@
*/ */
#include "dataset/engine/datasetops/source/voc_op.h" #include "dataset/engine/datasetops/source/voc_op.h"
#include <algorithm>
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include "./tinyxml2.h"
#include "common/utils.h" #include "common/utils.h"
#include "dataset/core/config_manager.h" #include "dataset/core/config_manager.h"
#include "dataset/core/tensor_shape.h" #include "dataset/core/tensor_shape.h"
...@@ -24,8 +26,24 @@ ...@@ -24,8 +26,24 @@
#include "dataset/engine/db_connector.h" #include "dataset/engine/db_connector.h"
#include "dataset/engine/execution_tree.h" #include "dataset/engine/execution_tree.h"
using tinyxml2::XMLDocument;
using tinyxml2::XMLElement;
using tinyxml2::XMLError;
namespace mindspore { namespace mindspore {
namespace dataset { namespace dataset {
const char kColumnImage[] = "image";
const char kColumnTarget[] = "target";
const char kColumnAnnotation[] = "annotation";
const char kJPEGImagesFolder[] = "/JPEGImages/";
const char kSegmentationClassFolder[] = "/SegmentationClass/";
const char kAnnotationsFolder[] = "/Annotations/";
const char kImageSetsSegmentation[] = "/ImageSets/Segmentation/";
const char kImageSetsMain[] = "/ImageSets/Main/";
const char kImageExtension[] = ".jpg";
const char kSegmentationExtension[] = ".png";
const char kAnnotationExtension[] = ".xml";
const char kImageSetsExtension[] = ".txt";
VOCOp::Builder::Builder() : builder_decode_(false), builder_num_samples_(0), builder_sampler_(nullptr) { VOCOp::Builder::Builder() : builder_decode_(false), builder_num_samples_(0), builder_sampler_(nullptr) {
std::shared_ptr<ConfigManager> cfg = GlobalContext::config_manager(); std::shared_ptr<ConfigManager> cfg = GlobalContext::config_manager();
builder_num_workers_ = cfg->num_parallel_workers(); builder_num_workers_ = cfg->num_parallel_workers();
...@@ -39,13 +57,21 @@ Status VOCOp::Builder::Build(std::shared_ptr<VOCOp> *ptr) { ...@@ -39,13 +57,21 @@ Status VOCOp::Builder::Build(std::shared_ptr<VOCOp> *ptr) {
builder_sampler_ = std::make_shared<SequentialSampler>(); builder_sampler_ = std::make_shared<SequentialSampler>();
} }
builder_schema_ = std::make_unique<DataSchema>(); builder_schema_ = std::make_unique<DataSchema>();
RETURN_IF_NOT_OK( if (builder_task_type_ == TaskType::Segmentation) {
builder_schema_->AddColumn(ColDescriptor("image", DataType(DataType::DE_UINT8), TensorImpl::kFlexible, 1))); RETURN_IF_NOT_OK(builder_schema_->AddColumn(
RETURN_IF_NOT_OK( ColDescriptor(std::string(kColumnImage), DataType(DataType::DE_UINT8), TensorImpl::kFlexible, 1)));
builder_schema_->AddColumn(ColDescriptor("target", DataType(DataType::DE_UINT8), TensorImpl::kFlexible, 1))); RETURN_IF_NOT_OK(builder_schema_->AddColumn(
*ptr = std::make_shared<VOCOp>(builder_num_workers_, builder_rows_per_buffer_, builder_dir_, ColDescriptor(std::string(kColumnTarget), DataType(DataType::DE_UINT8), TensorImpl::kFlexible, 1)));
builder_op_connector_size_, builder_num_samples_, builder_decode_, } else if (builder_task_type_ == TaskType::Detection) {
std::move(builder_schema_), std::move(builder_sampler_)); RETURN_IF_NOT_OK(builder_schema_->AddColumn(
ColDescriptor(std::string(kColumnImage), DataType(DataType::DE_UINT8), TensorImpl::kFlexible, 1)));
RETURN_IF_NOT_OK(builder_schema_->AddColumn(
ColDescriptor(std::string(kColumnAnnotation), DataType(DataType::DE_UINT32), TensorImpl::kFlexible, 1)));
}
*ptr = std::make_shared<VOCOp>(builder_task_type_, builder_task_mode_, builder_dir_, builder_labels_to_read_,
builder_num_workers_, builder_rows_per_buffer_, builder_op_connector_size_,
builder_num_samples_, builder_decode_, std::move(builder_schema_),
std::move(builder_sampler_));
return Status::OK(); return Status::OK();
} }
...@@ -58,8 +84,9 @@ Status VOCOp::Builder::SanityCheck() { ...@@ -58,8 +84,9 @@ Status VOCOp::Builder::SanityCheck() {
return err_msg.empty() ? Status::OK() : Status(StatusCode::kUnexpectedError, __LINE__, __FILE__, err_msg); return err_msg.empty() ? Status::OK() : Status(StatusCode::kUnexpectedError, __LINE__, __FILE__, err_msg);
} }
VOCOp::VOCOp(int32_t num_workers, int32_t rows_per_buffer, const std::string &folder_path, int32_t queue_size, VOCOp::VOCOp(const TaskType &task_type, const std::string &task_mode, const std::string &folder_path,
int64_t num_samples, bool decode, std::unique_ptr<DataSchema> data_schema, const std::map<std::string, int32_t> &class_index, int32_t num_workers, int32_t rows_per_buffer,
int32_t queue_size, int64_t num_samples, bool decode, std::unique_ptr<DataSchema> data_schema,
std::shared_ptr<Sampler> sampler) std::shared_ptr<Sampler> sampler)
: ParallelOp(num_workers, queue_size), : ParallelOp(num_workers, queue_size),
decode_(decode), decode_(decode),
...@@ -67,7 +94,10 @@ VOCOp::VOCOp(int32_t num_workers, int32_t rows_per_buffer, const std::string &fo ...@@ -67,7 +94,10 @@ VOCOp::VOCOp(int32_t num_workers, int32_t rows_per_buffer, const std::string &fo
buf_cnt_(0), buf_cnt_(0),
num_rows_(0), num_rows_(0),
num_samples_(num_samples), num_samples_(num_samples),
task_type_(task_type),
task_mode_(task_mode),
folder_path_(folder_path), folder_path_(folder_path),
class_index_(class_index),
rows_per_buffer_(rows_per_buffer), rows_per_buffer_(rows_per_buffer),
sampler_(std::move(sampler)), sampler_(std::move(sampler)),
data_schema_(std::move(data_schema)) { data_schema_(std::move(data_schema)) {
...@@ -167,12 +197,25 @@ Status VOCOp::GetNumSamples(int64_t *num) const { ...@@ -167,12 +197,25 @@ Status VOCOp::GetNumSamples(int64_t *num) const {
} }
Status VOCOp::LoadTensorRow(const std::string &image_id, TensorRow *trow) { Status VOCOp::LoadTensorRow(const std::string &image_id, TensorRow *trow) {
std::shared_ptr<Tensor> image, target; if (task_type_ == TaskType::Segmentation) {
const std::string kImageDir = folder_path_ + "/JPEGImages/" + image_id + ".jpg"; std::shared_ptr<Tensor> image, target;
const std::string kTargetDir = folder_path_ + "/SegmentationClass/" + image_id + ".png"; const std::string kImageFile =
RETURN_IF_NOT_OK(ReadImageToTensor(kImageDir, data_schema_->column(0), &image)); folder_path_ + std::string(kJPEGImagesFolder) + image_id + std::string(kImageExtension);
RETURN_IF_NOT_OK(ReadImageToTensor(kTargetDir, data_schema_->column(1), &target)); const std::string kTargetFile =
(*trow) = {std::move(image), std::move(target)}; folder_path_ + std::string(kSegmentationClassFolder) + image_id + std::string(kSegmentationExtension);
RETURN_IF_NOT_OK(ReadImageToTensor(kImageFile, data_schema_->column(0), &image));
RETURN_IF_NOT_OK(ReadImageToTensor(kTargetFile, data_schema_->column(1), &target));
(*trow) = {std::move(image), std::move(target)};
} else if (task_type_ == TaskType::Detection) {
std::shared_ptr<Tensor> image, annotation;
const std::string kImageFile =
folder_path_ + std::string(kJPEGImagesFolder) + image_id + std::string(kImageExtension);
const std::string kAnnotationFile =
folder_path_ + std::string(kAnnotationsFolder) + image_id + std::string(kAnnotationExtension);
RETURN_IF_NOT_OK(ReadImageToTensor(kImageFile, data_schema_->column(0), &image));
RETURN_IF_NOT_OK(ReadAnnotationToTensor(kAnnotationFile, data_schema_->column(1), &annotation));
(*trow) = {std::move(image), std::move(annotation)};
}
return Status::OK(); return Status::OK();
} }
...@@ -213,8 +256,13 @@ Status VOCOp::WorkerEntry(int32_t worker_id) { ...@@ -213,8 +256,13 @@ Status VOCOp::WorkerEntry(int32_t worker_id) {
} }
Status VOCOp::ParseImageIds() { Status VOCOp::ParseImageIds() {
const std::string kImageSets = "/ImageSets/Segmentation/train.txt"; std::string image_sets_file;
std::string image_sets_file = folder_path_ + kImageSets; if (task_type_ == TaskType::Segmentation) {
image_sets_file =
folder_path_ + std::string(kImageSetsSegmentation) + task_mode_ + std::string(kImageSetsExtension);
} else if (task_type_ == TaskType::Detection) {
image_sets_file = folder_path_ + std::string(kImageSetsMain) + task_mode_ + std::string(kImageSetsExtension);
}
std::ifstream in_file; std::ifstream in_file;
in_file.open(image_sets_file); in_file.open(image_sets_file);
if (in_file.fail()) { if (in_file.fail()) {
...@@ -231,6 +279,84 @@ Status VOCOp::ParseImageIds() { ...@@ -231,6 +279,84 @@ Status VOCOp::ParseImageIds() {
return Status::OK(); return Status::OK();
} }
Status VOCOp::ParseAnnotationIds() {
std::vector<std::string> new_image_ids;
for (auto id : image_ids_) {
const std::string kAnnotationName =
folder_path_ + std::string(kAnnotationsFolder) + id + std::string(kAnnotationExtension);
RETURN_IF_NOT_OK(ParseAnnotationBbox(kAnnotationName));
if (label_map_.find(kAnnotationName) != label_map_.end()) {
new_image_ids.push_back(id);
}
}
if (image_ids_.size() != new_image_ids.size()) {
image_ids_.clear();
image_ids_.insert(image_ids_.end(), new_image_ids.begin(), new_image_ids.end());
}
uint32_t count = 0;
for (auto &label : label_index_) {
label.second = count++;
}
num_rows_ = image_ids_.size();
num_samples_ = (num_samples_ == 0 || num_samples_ > num_rows_) ? num_rows_ : num_samples_;
return Status::OK();
}
Status VOCOp::ParseAnnotationBbox(const std::string &path) {
if (!Path(path).Exists()) {
RETURN_STATUS_UNEXPECTED("File is not found : " + path);
}
Bbox bbox;
XMLDocument doc;
XMLError e = doc.LoadFile(common::SafeCStr(path));
if (e != XMLError::XML_SUCCESS) {
RETURN_STATUS_UNEXPECTED("Xml load failed");
}
XMLElement *root = doc.RootElement();
if (root == nullptr) {
RETURN_STATUS_UNEXPECTED("Xml load root element error");
}
XMLElement *object = root->FirstChildElement("object");
if (object == nullptr) {
RETURN_STATUS_UNEXPECTED("No object find in " + path);
}
while (object != nullptr) {
std::string label_name;
uint32_t xmin = 0, ymin = 0, xmax = 0, ymax = 0, truncated = 0, difficult = 0;
XMLElement *name_node = object->FirstChildElement("name");
if (name_node != nullptr) label_name = name_node->GetText();
XMLElement *truncated_node = object->FirstChildElement("truncated");
if (truncated_node != nullptr) truncated = truncated_node->UnsignedText();
XMLElement *difficult_node = object->FirstChildElement("difficult");
if (difficult_node != nullptr) difficult = difficult_node->UnsignedText();
XMLElement *bbox_node = object->FirstChildElement("bndbox");
if (bbox_node != nullptr) {
XMLElement *xmin_node = bbox_node->FirstChildElement("xmin");
if (xmin_node != nullptr) xmin = xmin_node->UnsignedText();
XMLElement *ymin_node = bbox_node->FirstChildElement("ymin");
if (ymin_node != nullptr) ymin = ymin_node->UnsignedText();
XMLElement *xmax_node = bbox_node->FirstChildElement("xmax");
if (xmax_node != nullptr) xmax = xmax_node->UnsignedText();
XMLElement *ymax_node = bbox_node->FirstChildElement("ymax");
if (ymax_node != nullptr) ymax = ymax_node->UnsignedText();
} else {
RETURN_STATUS_UNEXPECTED("bndbox dismatch in " + path);
}
if (label_name != "" && (class_index_.empty() || class_index_.find(label_name) != class_index_.end()) && xmin > 0 &&
ymin > 0 && xmax > xmin && ymax > ymin) {
std::vector<uint32_t> bbox_list = {xmin, ymin, xmax - xmin, ymax - ymin, truncated, difficult};
bbox.emplace_back(std::make_pair(label_name, bbox_list));
label_index_[label_name] = 0;
}
object = object->NextSiblingElement("object");
}
if (bbox.size() > 0) label_map_[path] = bbox;
return Status::OK();
}
Status VOCOp::InitSampler() { Status VOCOp::InitSampler() {
RETURN_IF_NOT_OK(sampler_->HandshakeRandomAccessOp(this)); RETURN_IF_NOT_OK(sampler_->HandshakeRandomAccessOp(this));
return Status::OK(); return Status::OK();
...@@ -245,6 +371,9 @@ Status VOCOp::LaunchThreadsAndInitOp() { ...@@ -245,6 +371,9 @@ Status VOCOp::LaunchThreadsAndInitOp() {
RETURN_IF_NOT_OK(tree_->LaunchWorkers(num_workers_, std::bind(&VOCOp::WorkerEntry, this, std::placeholders::_1))); RETURN_IF_NOT_OK(tree_->LaunchWorkers(num_workers_, std::bind(&VOCOp::WorkerEntry, this, std::placeholders::_1)));
TaskManager::FindMe()->Post(); TaskManager::FindMe()->Post();
RETURN_IF_NOT_OK(this->ParseImageIds()); RETURN_IF_NOT_OK(this->ParseImageIds());
if (task_type_ == TaskType::Detection) {
RETURN_IF_NOT_OK(this->ParseAnnotationIds());
}
RETURN_IF_NOT_OK(this->InitSampler()); RETURN_IF_NOT_OK(this->InitSampler());
return Status::OK(); return Status::OK();
} }
...@@ -270,6 +399,34 @@ Status VOCOp::ReadImageToTensor(const std::string &path, const ColDescriptor &co ...@@ -270,6 +399,34 @@ Status VOCOp::ReadImageToTensor(const std::string &path, const ColDescriptor &co
return Status::OK(); return Status::OK();
} }
Status VOCOp::ReadAnnotationToTensor(const std::string &path, const ColDescriptor &col,
std::shared_ptr<Tensor> *tensor) {
Bbox bbox_info = label_map_[path];
std::vector<uint32_t> bbox_row;
dsize_t bbox_column_num = 0, bbox_num = 0;
for (auto box : bbox_info) {
if (label_index_.find(box.first) != label_index_.end()) {
std::vector<uint32_t> bbox;
if (class_index_.find(box.first) != class_index_.end()) {
bbox.emplace_back(class_index_[box.first]);
} else {
bbox.emplace_back(label_index_[box.first]);
}
bbox.insert(bbox.end(), box.second.begin(), box.second.end());
bbox_row.insert(bbox_row.end(), bbox.begin(), bbox.end());
if (bbox_column_num == 0) {
bbox_column_num = static_cast<dsize_t>(bbox.size());
}
bbox_num++;
}
}
std::vector<dsize_t> bbox_dim = {bbox_num, bbox_column_num};
RETURN_IF_NOT_OK(Tensor::CreateTensor(tensor, col.tensorImpl(), TensorShape(bbox_dim), col.type(),
reinterpret_cast<unsigned char *>(&bbox_row[0])));
return Status::OK();
}
// Derived from RandomAccessOp // Derived from RandomAccessOp
Status VOCOp::GetNumRowsInDataset(int64_t *num) const { Status VOCOp::GetNumRowsInDataset(int64_t *num) const {
if (num == nullptr || num_rows_ == 0) { if (num == nullptr || num_rows_ == 0) {
...@@ -280,5 +437,30 @@ Status VOCOp::GetNumRowsInDataset(int64_t *num) const { ...@@ -280,5 +437,30 @@ Status VOCOp::GetNumRowsInDataset(int64_t *num) const {
(*num) = num_rows_; (*num) = num_rows_;
return Status::OK(); return Status::OK();
} }
Status VOCOp::GetClassIndexing(const std::string &dir, const std::string &task_type, const std::string &task_mode,
const py::dict &dict, int64_t numSamples,
std::map<std::string, int32_t> *output_class_indexing) {
std::map<std::string, int32_t> input_class_indexing;
for (auto p : dict) {
(void)input_class_indexing.insert(std::pair<std::string, int32_t>(py::reinterpret_borrow<py::str>(p.first),
py::reinterpret_borrow<py::int_>(p.second)));
}
if (!input_class_indexing.empty()) {
*output_class_indexing = input_class_indexing;
} else {
std::shared_ptr<VOCOp> op;
RETURN_IF_NOT_OK(
Builder().SetDir(dir).SetTask(task_type).SetMode(task_mode).SetClassIndex(input_class_indexing).Build(&op));
RETURN_IF_NOT_OK(op->ParseImageIds());
RETURN_IF_NOT_OK(op->ParseAnnotationIds());
for (const auto label : op->label_index_) {
(*output_class_indexing).insert(std::make_pair(label.first, label.second));
}
}
return Status::OK();
}
} // namespace dataset } // namespace dataset
} // namespace mindspore } // namespace mindspore
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#ifndef DATASET_ENGINE_DATASETOPS_SOURCE_VOC_OP_H_ #ifndef DATASET_ENGINE_DATASETOPS_SOURCE_VOC_OP_H_
#define DATASET_ENGINE_DATASETOPS_SOURCE_VOC_OP_H_ #define DATASET_ENGINE_DATASETOPS_SOURCE_VOC_OP_H_
#include <map>
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility> #include <utility>
...@@ -39,8 +40,12 @@ namespace dataset { ...@@ -39,8 +40,12 @@ namespace dataset {
template <typename T> template <typename T>
class Queue; class Queue;
using Bbox = std::vector<std::pair<std::string, std::vector<uint32_t>>>;
class VOCOp : public ParallelOp, public RandomAccessOp { class VOCOp : public ParallelOp, public RandomAccessOp {
public: public:
enum class TaskType { Segmentation = 0, Detection = 1 };
class Builder { class Builder {
public: public:
// Constructor for Builder class of ImageFolderOp // Constructor for Builder class of ImageFolderOp
...@@ -59,6 +64,34 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -59,6 +64,34 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
return *this; return *this;
} }
// Setter method.
// @param const std::map<std::string, int32_t> &map - a class name to label map
// @return Builder setter method returns reference to the builder.
Builder &SetClassIndex(const std::map<std::string, int32_t> &map) {
builder_labels_to_read_ = map;
return *this;
}
// Setter method.
// @param const std::string & task_type
// @return Builder setter method returns reference to the builder.
Builder &SetTask(const std::string &task_type) {
if (task_type == "Segmentation") {
builder_task_type_ = TaskType::Segmentation;
} else if (task_type == "Detection") {
builder_task_type_ = TaskType::Detection;
}
return *this;
}
// Setter method.
// @param const std::string & task_mode
// @return Builder setter method returns reference to the builder.
Builder &SetMode(const std::string &task_mode) {
builder_task_mode_ = task_mode;
return *this;
}
// Setter method. // Setter method.
// @param int32_t num_workers // @param int32_t num_workers
// @return Builder setter method returns reference to the builder. // @return Builder setter method returns reference to the builder.
...@@ -119,25 +152,33 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -119,25 +152,33 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
private: private:
bool builder_decode_; bool builder_decode_;
std::string builder_dir_; std::string builder_dir_;
TaskType builder_task_type_;
std::string builder_task_mode_;
int32_t builder_num_workers_; int32_t builder_num_workers_;
int32_t builder_op_connector_size_; int32_t builder_op_connector_size_;
int32_t builder_rows_per_buffer_; int32_t builder_rows_per_buffer_;
int64_t builder_num_samples_; int64_t builder_num_samples_;
std::shared_ptr<Sampler> builder_sampler_; std::shared_ptr<Sampler> builder_sampler_;
std::unique_ptr<DataSchema> builder_schema_; std::unique_ptr<DataSchema> builder_schema_;
std::map<std::string, int32_t> builder_labels_to_read_;
}; };
// Constructor // Constructor
// @param TaskType task_type - task type of VOC
// @param std::string task_mode - task mode of VOC
// @param std::string folder_path - dir directory of VOC
// @param std::map<std::string, int32_t> class_index - input class-to-index of annotation
// @param int32_t num_workers - number of workers reading images in parallel // @param int32_t num_workers - number of workers reading images in parallel
// @param int32_t rows_per_buffer - number of images (rows) in each buffer // @param int32_t rows_per_buffer - number of images (rows) in each buffer
// @param std::string folder_path - dir directory of VOC
// @param int32_t queue_size - connector queue size // @param int32_t queue_size - connector queue size
// @param int64_t num_samples - number of samples to read // @param int64_t num_samples - number of samples to read
// @param bool decode - whether to decode images // @param bool decode - whether to decode images
// @param std::unique_ptr<DataSchema> data_schema - the schema of the VOC dataset // @param std::unique_ptr<DataSchema> data_schema - the schema of the VOC dataset
// @param std::shared_ptr<Sampler> sampler - sampler tells VOCOp what to read // @param std::shared_ptr<Sampler> sampler - sampler tells VOCOp what to read
VOCOp(int32_t num_workers, int32_t rows_per_buffer, const std::string &folder_path, int32_t queue_size, VOCOp(const TaskType &task_type, const std::string &task_mode, const std::string &folder_path,
int64_t num_samples, bool decode, std::unique_ptr<DataSchema> data_schema, std::shared_ptr<Sampler> sampler); const std::map<std::string, int32_t> &class_index, int32_t num_workers, int32_t rows_per_buffer,
int32_t queue_size, int64_t num_samples, bool decode, std::unique_ptr<DataSchema> data_schema,
std::shared_ptr<Sampler> sampler);
// Destructor // Destructor
~VOCOp() = default; ~VOCOp() = default;
...@@ -167,6 +208,16 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -167,6 +208,16 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
// @param show_all // @param show_all
void Print(std::ostream &out, bool show_all) const override; void Print(std::ostream &out, bool show_all) const override;
// @param const std::string &dir - VOC dir path
// @param const std::string &task_type - task type of reading voc job
// @param const std::string &task_mode - task mode of reading voc job
// @param const py::dict &dict - input dict of class index
// @param int64_t numSamples - samples number of VOCDataset
// @param std::map<std::string, int32_t> *output_class_indexing - output class index of VOCDataset
static Status GetClassIndexing(const std::string &dir, const std::string &task_type, const std::string &task_mode,
const py::dict &dict, int64_t numSamples,
std::map<std::string, int32_t> *output_class_indexing);
private: private:
// Initialize Sampler, calls sampler->Init() within // Initialize Sampler, calls sampler->Init() within
// @return Status - The error code return // @return Status - The error code return
...@@ -184,19 +235,40 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -184,19 +235,40 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
// @return Status - The error code return // @return Status - The error code return
Status ReadImageToTensor(const std::string &path, const ColDescriptor &col, std::shared_ptr<Tensor> *tensor); Status ReadImageToTensor(const std::string &path, const ColDescriptor &col, std::shared_ptr<Tensor> *tensor);
// @param const std::string &path - path to the image file
// @param const ColDescriptor &col - contains tensor implementation and datatype
// @param std::shared_ptr<Tensor> tensor - return
// @return Status - The error code return
Status ReadAnnotationToTensor(const std::string &path, const ColDescriptor &col, std::shared_ptr<Tensor> *tensor);
// @param const std::vector<uint64_t> &keys - keys in ioblock // @param const std::vector<uint64_t> &keys - keys in ioblock
// @param std::unique_ptr<DataBuffer> db // @param std::unique_ptr<DataBuffer> db
// @return Status - The error code return // @return Status - The error code return
Status LoadBuffer(const std::vector<int64_t> &keys, std::unique_ptr<DataBuffer> *db); Status LoadBuffer(const std::vector<int64_t> &keys, std::unique_ptr<DataBuffer> *db);
// Read image list from ImageSets
// @return Status - The error code return
Status ParseImageIds(); Status ParseImageIds();
// Read annotation from Annotation folder
// @return Status - The error code return
Status ParseAnnotationIds();
// @param const std::string &path - path to annotation xml
// @return Status - The error code return
Status ParseAnnotationBbox(const std::string &path);
// @param const std::shared_ptr<Tensor> &sample_ids - sample ids of tensor
// @param std::vector<int64_t> *keys - image id
// @return Status - The error code return
Status TraverseSampleIds(const std::shared_ptr<Tensor> &sample_ids, std::vector<int64_t> *keys); Status TraverseSampleIds(const std::shared_ptr<Tensor> &sample_ids, std::vector<int64_t> *keys);
// Called first when function is called // Called first when function is called
// @return Status - The error code return // @return Status - The error code return
Status LaunchThreadsAndInitOp(); Status LaunchThreadsAndInitOp();
// Reset dataset state
// @return Status - The error code return
Status Reset() override; Status Reset() override;
bool decode_; bool decode_;
...@@ -205,6 +277,8 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -205,6 +277,8 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
int64_t num_rows_; int64_t num_rows_;
int64_t num_samples_; int64_t num_samples_;
std::string folder_path_; std::string folder_path_;
TaskType task_type_;
std::string task_mode_;
int32_t rows_per_buffer_; int32_t rows_per_buffer_;
std::shared_ptr<Sampler> sampler_; std::shared_ptr<Sampler> sampler_;
std::unique_ptr<DataSchema> data_schema_; std::unique_ptr<DataSchema> data_schema_;
...@@ -212,6 +286,9 @@ class VOCOp : public ParallelOp, public RandomAccessOp { ...@@ -212,6 +286,9 @@ class VOCOp : public ParallelOp, public RandomAccessOp {
WaitPost wp_; WaitPost wp_;
std::vector<std::string> image_ids_; std::vector<std::string> image_ids_;
QueueList<std::unique_ptr<IOBlock>> io_block_queues_; QueueList<std::unique_ptr<IOBlock>> io_block_queues_;
std::map<std::string, int32_t> class_index_;
std::map<std::string, int32_t> label_index_;
std::map<std::string, Bbox> label_map_;
}; };
} // namespace dataset } // namespace dataset
} // namespace mindspore } // namespace mindspore
......
...@@ -34,7 +34,7 @@ import copy ...@@ -34,7 +34,7 @@ import copy
import numpy as np import numpy as np
from mindspore._c_dataengine import DataType, TFReaderOp, ImageFolderOp, CifarOp, MnistOp, ManifestOp, \ from mindspore._c_dataengine import DataType, TFReaderOp, ImageFolderOp, CifarOp, MnistOp, ManifestOp, \
MindRecordOp, TextFileOp, CBatchInfo MindRecordOp, TextFileOp, VOCOp, CBatchInfo
from mindspore._c_expression import typing from mindspore._c_expression import typing
from mindspore import log as logger from mindspore import log as logger
...@@ -3462,6 +3462,12 @@ class VOCDataset(SourceDataset): ...@@ -3462,6 +3462,12 @@ class VOCDataset(SourceDataset):
Args: Args:
dataset_dir (str): Path to the root directory that contains the dataset. dataset_dir (str): Path to the root directory that contains the dataset.
task (str): Set the task type of reading voc data, now only support "Segmentation" or "Detection"
(default="Segmentation")
mode(str): Set the data list txt file to be readed (default="train")
class_indexing (dict, optional): A str-to-int mapping from label name to index
(default=None, the folder names will be sorted alphabetically and each
class will be given a unique index starting from 0).
num_samples (int, optional): The number of images to be included in the dataset num_samples (int, optional): The number of images to be included in the dataset
(default=None, all images). (default=None, all images).
num_parallel_workers (int, optional): Number of workers to read the data num_parallel_workers (int, optional): Number of workers to read the data
...@@ -3477,27 +3483,41 @@ class VOCDataset(SourceDataset): ...@@ -3477,27 +3483,41 @@ class VOCDataset(SourceDataset):
argument should be specified only when num_shards is also specified. argument should be specified only when num_shards is also specified.
Raises: Raises:
RuntimeError: If xml of Annotations is a invalid format
RuntimeError: If xml of Annotations loss attribution of "object"
RuntimeError: If xml of Annotations loss attribution of "bndbox"
RuntimeError: If sampler and shuffle are specified at the same time. RuntimeError: If sampler and shuffle are specified at the same time.
RuntimeError: If sampler and sharding are specified at the same time. RuntimeError: If sampler and sharding are specified at the same time.
RuntimeError: If num_shards is specified but shard_id is None. RuntimeError: If num_shards is specified but shard_id is None.
RuntimeError: If shard_id is specified but num_shards is None. RuntimeError: If shard_id is specified but num_shards is None.
ValueError: If task is not equal 'Segmentation' or 'Detection'.
ValueError: If task equal 'Segmentation' but class_indexing is not None.
ValueError: If txt related to mode is not exist.
ValueError: If shard_id is invalid (< 0 or >= num_shards). ValueError: If shard_id is invalid (< 0 or >= num_shards).
Examples: Examples:
>>> import mindspore.dataset as ds >>> import mindspore.dataset as ds
>>> dataset_dir = "/path/to/voc_dataset_directory" >>> dataset_dir = "/path/to/voc_dataset_directory"
>>> # 1) read all VOC dataset samples in dataset_dir with 8 threads in random order: >>> # 1) read VOC data for segmenatation train
>>> voc_dataset = ds.VOCDataset(dataset_dir, num_parallel_workers=8) >>> voc_dataset = ds.VOCDataset(dataset_dir, task="Segmentation", mode="train")
>>> # 2) read then decode all VOC dataset samples in dataset_dir in sequence: >>> # 2) read VOC data for detection train
>>> voc_dataset = ds.VOCDataset(dataset_dir, decode=True, shuffle=False) >>> voc_dataset = ds.VOCDataset(dataset_dir, task="Detection", mode="train")
>>> # in VOC dataset, each dictionary has keys "image" and "target" >>> # 3) read all VOC dataset samples in dataset_dir with 8 threads in random order:
>>> voc_dataset = ds.VOCDataset(dataset_dir, task="Detection", mode="train", num_parallel_workers=8)
>>> # 4) read then decode all VOC dataset samples in dataset_dir in sequence:
>>> voc_dataset = ds.VOCDataset(dataset_dir, task="Detection", mode="train", decode=True, shuffle=False)
>>> # in VOC dataset, if task='Segmentation', each dictionary has keys "image" and "target"
>>> # in VOC dataset, if task='Detection', each dictionary has keys "image" and "annotation"
""" """
@check_vocdataset @check_vocdataset
def __init__(self, dataset_dir, num_samples=None, num_parallel_workers=None, def __init__(self, dataset_dir, task="Segmentation", mode="train", class_indexing=None, num_samples=None,
shuffle=None, decode=False, sampler=None, num_shards=None, shard_id=None): num_parallel_workers=None, shuffle=None, decode=False, sampler=None, num_shards=None, shard_id=None):
super().__init__(num_parallel_workers) super().__init__(num_parallel_workers)
self.dataset_dir = dataset_dir self.dataset_dir = dataset_dir
self.task = task
self.mode = mode
self.class_indexing = class_indexing
self.sampler = _select_sampler(num_samples, sampler, shuffle, num_shards, shard_id) self.sampler = _select_sampler(num_samples, sampler, shuffle, num_shards, shard_id)
self.num_samples = num_samples self.num_samples = num_samples
self.decode = decode self.decode = decode
...@@ -3508,6 +3528,9 @@ class VOCDataset(SourceDataset): ...@@ -3508,6 +3528,9 @@ class VOCDataset(SourceDataset):
def get_args(self): def get_args(self):
args = super().get_args() args = super().get_args()
args["dataset_dir"] = self.dataset_dir args["dataset_dir"] = self.dataset_dir
args["task"] = self.task
args["mode"] = self.mode
args["class_indexing"] = self.class_indexing
args["num_samples"] = self.num_samples args["num_samples"] = self.num_samples
args["sampler"] = self.sampler args["sampler"] = self.sampler
args["decode"] = self.decode args["decode"] = self.decode
...@@ -3525,6 +3548,28 @@ class VOCDataset(SourceDataset): ...@@ -3525,6 +3548,28 @@ class VOCDataset(SourceDataset):
""" """
return self.num_samples return self.num_samples
def get_class_indexing(self):
"""
Get the class index.
Return:
Dict, A str-to-int mapping from label name to index.
"""
if self.task != "Detection":
raise NotImplementedError()
if self.num_samples is None:
num_samples = 0
else:
num_samples = self.num_samples
if self.class_indexing is None:
class_indexing = dict()
else:
class_indexing = self.class_indexing
return VOCOp.get_class_indexing(self.dataset_dir, self.task, self.mode, class_indexing, num_samples)
class CelebADataset(SourceDataset): class CelebADataset(SourceDataset):
""" """
......
...@@ -285,9 +285,9 @@ def create_node(node): ...@@ -285,9 +285,9 @@ def create_node(node):
elif dataset_op == 'VOCDataset': elif dataset_op == 'VOCDataset':
sampler = construct_sampler(node.get('sampler')) sampler = construct_sampler(node.get('sampler'))
pyobj = pyclass(node['dataset_dir'], node.get('num_samples'), node.get('num_parallel_workers'), pyobj = pyclass(node['dataset_dir'], node.get('task'), node.get('mode'), node.get('class_indexing'),
node.get('shuffle'), node.get('decode'), sampler, node.get('num_shards'), node.get('num_samples'), node.get('num_parallel_workers'), node.get('shuffle'),
node.get('shard_id')) node.get('decode'), sampler, node.get('num_shards'), node.get('shard_id'))
elif dataset_op == 'CelebADataset': elif dataset_op == 'CelebADataset':
sampler = construct_sampler(node.get('sampler')) sampler = construct_sampler(node.get('sampler'))
......
...@@ -455,17 +455,44 @@ def check_vocdataset(method): ...@@ -455,17 +455,44 @@ def check_vocdataset(method):
nreq_param_int = ['num_samples', 'num_parallel_workers', 'num_shards', 'shard_id'] nreq_param_int = ['num_samples', 'num_parallel_workers', 'num_shards', 'shard_id']
nreq_param_bool = ['shuffle', 'decode'] nreq_param_bool = ['shuffle', 'decode']
nreq_param_dict = ['class_indexing']
# check dataset_dir; required argument # check dataset_dir; required argument
dataset_dir = param_dict.get('dataset_dir') dataset_dir = param_dict.get('dataset_dir')
if dataset_dir is None: if dataset_dir is None:
raise ValueError("dataset_dir is not provided.") raise ValueError("dataset_dir is not provided.")
check_dataset_dir(dataset_dir) check_dataset_dir(dataset_dir)
# check task; required argument
task = param_dict.get('task')
if task is None:
raise ValueError("task is not provided.")
if not isinstance(task, str):
raise ValueError("task is not str type.")
# check mode; required argument
mode = param_dict.get('mode')
if mode is None:
raise ValueError("mode is not provided.")
if not isinstance(mode, str):
raise ValueError("mode is not str type.")
imagesets_file = ""
if task == "Segmentation":
imagesets_file = os.path.join(dataset_dir, "ImageSets", "Segmentation", mode + ".txt")
if param_dict.get('class_indexing') is not None:
raise ValueError("class_indexing is invalid in Segmentation task")
elif task == "Detection":
imagesets_file = os.path.join(dataset_dir, "ImageSets", "Main", mode + ".txt")
else:
raise ValueError("Invalid task : " + task)
check_dataset_file(imagesets_file)
check_param_type(nreq_param_int, param_dict, int) check_param_type(nreq_param_int, param_dict, int)
check_param_type(nreq_param_bool, param_dict, bool) check_param_type(nreq_param_bool, param_dict, bool)
check_param_type(nreq_param_dict, param_dict, dict)
check_sampler_shuffle_shard_options(param_dict) check_sampler_shuffle_shard_options(param_dict)
return method(*args, **kwargs) return method(*args, **kwargs)
......
...@@ -50,17 +50,170 @@ std::shared_ptr<RepeatOp> Repeat(int repeat_cnt); ...@@ -50,17 +50,170 @@ std::shared_ptr<RepeatOp> Repeat(int repeat_cnt);
std::shared_ptr<ExecutionTree> Build(std::vector<std::shared_ptr<DatasetOp>> ops); std::shared_ptr<ExecutionTree> Build(std::vector<std::shared_ptr<DatasetOp>> ops);
std::shared_ptr<VOCOp> CreateVOC(int64_t num_wrks, int64_t rows, int64_t conns, std::string path, class MindDataTestVOCOp : public UT::DatasetOpTesting {
bool shuf = false, std::unique_ptr<Sampler> sampler = nullptr, protected:
int64_t num_samples = 0, bool decode = false) { };
std::shared_ptr<VOCOp> so;
TEST_F(MindDataTestVOCOp, TestVOCDetection) {
// Start with an empty execution tree
auto my_tree = std::make_shared<ExecutionTree>();
std::string dataset_path;
dataset_path = datasets_root_path_ + "/testVOC2012";
std::string task_type("Detection");
std::string task_mode("train");
std::shared_ptr<VOCOp> my_voc_op;
VOCOp::Builder builder; VOCOp::Builder builder;
Status rc = builder.SetNumWorkers(num_wrks).SetDir(path).SetRowsPerBuffer(rows) Status rc = builder.SetDir(dataset_path)
.SetOpConnectorSize(conns).SetSampler(std::move(sampler)) .SetTask(task_type)
.SetNumSamples(num_samples).SetDecode(decode).Build(&so); .SetMode(task_mode)
return so; .Build(&my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssociateNode(my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssignRoot(my_voc_op);
ASSERT_TRUE(rc.IsOk());
MS_LOG(DEBUG) << "Launch tree and begin iteration.";
rc = my_tree->Prepare();
ASSERT_TRUE(rc.IsOk());
rc = my_tree->Launch();
ASSERT_TRUE(rc.IsOk());
// Start the loop of reading tensors from our pipeline
DatasetIterator di(my_tree);
TensorRow tensor_list;
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
int row_count = 0;
while (!tensor_list.empty()) {
MS_LOG(DEBUG) << "Row display for row #: " << row_count << ".";
//Display the tensor by calling the printer on it
for (int i = 0; i < tensor_list.size(); i++) {
std::ostringstream ss;
ss << "(" << tensor_list[i] << "): " << *tensor_list[i] << std::endl;
MS_LOG(DEBUG) << "Tensor print: " << ss.str() << ".";
}
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
row_count++;
}
ASSERT_EQ(row_count, 9);
} }
class MindDataTestVOCSampler : public UT::DatasetOpTesting { TEST_F(MindDataTestVOCOp, TestVOCSegmentation) {
protected: // Start with an empty execution tree
}; auto my_tree = std::make_shared<ExecutionTree>();
std::string dataset_path;
dataset_path = datasets_root_path_ + "/testVOC2012";
std::string task_type("Segmentation");
std::string task_mode("train");
std::shared_ptr<VOCOp> my_voc_op;
VOCOp::Builder builder;
Status rc = builder.SetDir(dataset_path)
.SetTask(task_type)
.SetMode(task_mode)
.Build(&my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssociateNode(my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssignRoot(my_voc_op);
ASSERT_TRUE(rc.IsOk());
MS_LOG(DEBUG) << "Launch tree and begin iteration.";
rc = my_tree->Prepare();
ASSERT_TRUE(rc.IsOk());
rc = my_tree->Launch();
ASSERT_TRUE(rc.IsOk());
// Start the loop of reading tensors from our pipeline
DatasetIterator di(my_tree);
TensorRow tensor_list;
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
int row_count = 0;
while (!tensor_list.empty()) {
MS_LOG(DEBUG) << "Row display for row #: " << row_count << ".";
//Display the tensor by calling the printer on it
for (int i = 0; i < tensor_list.size(); i++) {
std::ostringstream ss;
ss << "(" << tensor_list[i] << "): " << *tensor_list[i] << std::endl;
MS_LOG(DEBUG) << "Tensor print: " << ss.str() << ".";
}
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
row_count++;
}
ASSERT_EQ(row_count, 10);
}
TEST_F(MindDataTestVOCOp, TestVOCClassIndex) {
// Start with an empty execution tree
auto my_tree = std::make_shared<ExecutionTree>();
std::string dataset_path;
dataset_path = datasets_root_path_ + "/testVOC2012";
std::string task_type("Detection");
std::string task_mode("train");
std::map<std::string, int32_t> class_index;
class_index["car"] = 0;
class_index["cat"] = 1;
class_index["train"] = 5;
std::shared_ptr<VOCOp> my_voc_op;
VOCOp::Builder builder;
Status rc = builder.SetDir(dataset_path)
.SetTask(task_type)
.SetMode(task_mode)
.SetClassIndex(class_index)
.Build(&my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssociateNode(my_voc_op);
ASSERT_TRUE(rc.IsOk());
rc = my_tree->AssignRoot(my_voc_op);
ASSERT_TRUE(rc.IsOk());
MS_LOG(DEBUG) << "Launch tree and begin iteration.";
rc = my_tree->Prepare();
ASSERT_TRUE(rc.IsOk());
rc = my_tree->Launch();
ASSERT_TRUE(rc.IsOk());
// Start the loop of reading tensors from our pipeline
DatasetIterator di(my_tree);
TensorRow tensor_list;
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
int row_count = 0;
while (!tensor_list.empty()) {
MS_LOG(DEBUG) << "Row display for row #: " << row_count << ".";
//Display the tensor by calling the printer on it
for (int i = 0; i < tensor_list.size(); i++) {
std::ostringstream ss;
ss << "(" << tensor_list[i] << "): " << *tensor_list[i] << std::endl;
MS_LOG(DEBUG) << "Tensor print: " << ss.str() << ".";
}
rc = di.FetchNextTensorRow(&tensor_list);
ASSERT_TRUE(rc.IsOk());
row_count++;
}
ASSERT_EQ(row_count, 6);
}
<annotation> <annotation>
<folder>VOC2012</folder> <folder>VOC2012</folder>
<filename>27.jpg</filename> <filename>32.jpg</filename>
<source> <source>
<database>simulate VOC2007 Database</database> <database>simulate VOC2007 Database</database>
<annotation>simulate VOC2007</annotation> <annotation>simulate VOC2007</annotation>
<image>flickr</image> <image>flickr</image>
</source> </source>
<size> <size>
<width>486</width> <width>500</width>
<height>500</height> <height>281</height>
<depth>3</depth> <depth>3</depth>
</size> </size>
<segmented>0</segmented> <segmented>1</segmented>
<object> <object>
<name>person</name> <name>train</name>
<pose>Unspecified</pose> <pose>Frontal</pose>
<truncated>0</truncated> <truncated>0</truncated>
<difficult>0</difficult> <difficult>0</difficult>
<bndbox> <bndbox>
<xmin>161</xmin> <xmin>113</xmin>
<ymin>132</ymin> <ymin>79</ymin>
<xmax>323</xmax> <xmax>323</xmax>
<ymax>342</ymax> <ymax>191</ymax>
</bndbox>
</object>
<object>
<name>train</name>
<pose>Left</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>121</xmin>
<ymin>91</ymin>
<xmax>191</xmax>
<ymax>121</ymax>
</bndbox>
</object>
<object>
<name>car</name>
<pose>Rear</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>195</xmin>
<ymin>155</ymin>
<xmax>235</xmax>
<ymax>235</ymax>
</bndbox> </bndbox>
<part>
<name>head</name>
<bndbox>
<xmin>159</xmin>
<ymin>113</ymin>
<xmax>208</xmax>
<ymax>166</ymax>
</bndbox>
</part>
<part>
<name>foot</name>
<bndbox>
<xmin>261</xmin>
<ymin>321</ymin>
<xmax>287</xmax>
<ymax>344</ymax>
</bndbox>
</part>
<part>
<name>foot</name>
<bndbox>
<xmin>329</xmin>
<ymin>317</ymin>
<xmax>330</xmax>
<ymax>366</ymax>
</bndbox>
</part>
</object> </object>
</annotation> </annotation>
<annotation>
<folder>VOC2012</folder>
<filename>33.jpg</filename>
<source>
<database>simulate VOC2007 Database</database>
<annotation>simulate VOC2007</annotation>
<image>flickr</image>
</source>
<size>
<width>500</width>
<height>366</height>
<depth>3</depth>
</size>
<segmented>1</segmented>
</annotation>
\ No newline at end of file
2007_000032 15
2007_000033 \ No newline at end of file
2007_000039
2007_000042
2007_000061
2007_000063
2007_000068
2007_000121
2007_000123
2007_000129
2007_000170
2007_000175
2007_000187
2007_000241
2007_000243
2007_000250
2007_000256
2007_000323
2007_000332
2007_000333
2007_000346
2007_000363
2007_000364
2007_000392
2007_000452
2007_000464
2007_000480
2007_000491
2007_000504
2007_000515
2007_000528
2007_000529
2007_000549
2007_000559
2007_000572
2007_000584
2007_000629
2007_000636
2007_000645
2007_000648
2007_000661
2007_000663
2007_000676
2007_000713
2007_000720
2007_000727
2007_000733
2007_000738
2007_000762
2007_000768
2007_000783
2007_000793
2007_000799
2007_000804
2007_000822
2007_000830
2007_000836
2007_000837
2007_000847
2007_000862
2007_000876
2007_000904
2007_000925
2007_000999
2007_001027
2007_001073
2007_001149
2007_001154
2007_001175
2007_001185
2007_001225
2007_001239
2007_001284
2007_001288
2007_001289
2007_001299
2007_001311
2007_001321
2007_001340
2007_001377
2007_001397
2007_001408
2007_001416
2007_001420
2007_001423
2007_001430
2007_001439
2007_001457
2007_001458
2007_001487
2007_001526
2007_001568
2007_001585
2007_001586
2007_001587
2007_001594
2007_001595
2007_001602
2007_001609
2007_001630
2007_001677
2007_001678
2007_001698
2007_001704
2007_001709
2007_001717
2007_001724
2007_001733
2007_001761
2007_001763
2007_001764
2007_001774
2007_001825
2007_001834
2007_001857
2007_001872
2007_001884
2007_001901
2007_001917
2007_001955
2007_001960
2007_002024
2007_002046
2007_002055
2007_002088
2007_002094
2007_002099
2007_002105
2007_002107
2007_002119
2007_002120
2007_002132
2007_002142
2007_002198
2007_002212
2007_002216
2007_002227
2007_002234
2007_002260
2007_002266
2007_002268
2007_002273
2007_002281
2007_002284
2007_002293
2007_002361
2007_002368
2007_002370
2007_002376
2007_002378
2007_002387
2007_002400
2007_002403
2007_002412
2007_002426
2007_002427
2007_002445
2007_002462
2007_002470
2007_002488
2007_002539
2007_002545
2007_002565
2007_002597
2007_002611
2007_002618
2007_002619
2007_002624
2007_002639
2007_002643
2007_002648
2007_002668
2007_002669
2007_002719
2007_002728
2007_002760
2007_002789
2007_002823
2007_002824
2007_002845
2007_002852
2007_002895
2007_002896
2007_002903
2007_002914
2007_002953
2007_002954
2007_002967
2007_003000
2007_003011
2007_003020
2007_003022
2007_003051
2007_003088
2007_003101
2007_003106
2007_003110
2007_003118
2007_003131
2007_003134
2007_003137
2007_003143
2007_003169
2007_003178
2007_003188
2007_003189
2007_003190
2007_003191
2007_003194
2007_003195
2007_003201
2007_003205
2007_003207
2007_003251
2007_003267
2007_003286
2007_003330
2007_003349
2007_003367
2007_003373
2007_003431
2007_003451
2007_003499
2007_003503
2007_003506
2007_003525
2007_003529
2007_003530
2007_003541
2007_003565
2007_003571
2007_003580
2007_003587
2007_003593
2007_003604
2007_003611
2007_003621
2007_003668
2007_003682
2007_003711
2007_003714
2007_003715
2007_003742
2007_003778
2007_003786
2007_003788
2007_003815
2007_003841
2007_003848
2007_003861
2007_003872
2007_003876
2007_003889
2007_003910
2007_003917
2007_003957
2007_003991
2007_004003
2007_004009
2007_004033
2007_004052
2007_004065
2007_004081
2007_004112
2007_004121
2007_004143
2007_004166
2007_004189
2007_004190
2007_004193
2007_004241
2007_004275
2007_004281
2007_004289
2007_004291
2007_004328
2007_004380
2007_004392
2007_004405
2007_004423
2007_004459
2007_004468
2007_004476
2007_004481
2007_004483
2007_004500
2007_004510
2007_004537
2007_004538
2007_004558
2007_004627
2007_004644
2007_004649
2007_004663
2007_004705
2007_004707
2007_004712
2007_004722
2007_004768
2007_004769
2007_004810
2007_004830
2007_004841
2007_004856
2007_004866
2007_004902
2007_004948
2007_004951
2007_004969
2007_004988
2007_004998
2007_005043
2007_005058
2007_005064
2007_005074
2007_005086
2007_005107
2007_005114
2007_005124
2007_005130
2007_005144
2007_005149
2007_005173
2007_005210
2007_005212
2007_005227
2007_005248
2007_005262
2007_005264
2007_005266
2007_005273
2007_005281
2007_005294
2007_005296
2007_005304
2007_005314
2007_005331
2007_005354
2007_005358
2007_005360
2007_005368
2007_005428
2007_005430
2007_005460
2007_005469
2007_005509
2007_005547
2007_005600
2007_005608
2007_005626
2007_005647
2007_005688
2007_005689
2007_005696
2007_005702
2007_005705
2007_005759
2007_005790
2007_005797
2007_005803
2007_005813
2007_005828
2007_005844
2007_005845
2007_005857
2007_005859
2007_005878
2007_005902
2007_005911
2007_005915
2007_005951
2007_005978
2007_005988
2007_005989
2007_006004
2007_006028
2007_006035
2007_006046
2007_006066
2007_006076
2007_006086
2007_006117
2007_006134
2007_006136
2007_006151
2007_006171
2007_006212
2007_006232
2007_006241
2007_006254
2007_006260
2007_006277
2007_006281
2007_006303
2007_006317
2007_006348
2007_006364
2007_006373
2007_006400
2007_006409
2007_006444
2007_006445
2007_006449
2007_006477
2007_006483
2007_006490
2007_006530
2007_006549
2007_006553
2007_006560
2007_006581
2007_006585
2007_006605
2007_006615
2007_006641
2007_006647
2007_006660
2007_006661
2007_006673
2007_006678
2007_006680
2007_006698
2007_006699
2007_006704
2007_006761
2007_006802
2007_006803
2007_006832
2007_006837
2007_006841
2007_006864
2007_006865
2007_006866
2007_006899
2007_006900
2007_006944
2007_006946
2007_007003
2007_007007
2007_007021
2007_007048
2007_007084
2007_007098
2007_007109
2007_007130
2007_007154
2007_007165
2007_007168
2007_007195
2007_007196
2007_007203
2007_007211
2007_007230
2007_007235
2007_007250
2007_007341
2007_007355
2007_007387
2007_007398
2007_007414
2007_007415
2007_007417
2007_007432
2007_007447
2007_007470
2007_007477
2007_007480
2007_007481
2007_007493
2007_007498
2007_007523
2007_007524
2007_007530
2007_007534
2007_007585
2007_007591
2007_007621
2007_007624
2007_007649
2007_007651
2007_007688
2007_007698
2007_007726
2007_007748
2007_007772
2007_007773
2007_007783
2007_007795
2007_007810
2007_007815
2007_007818
2007_007836
2007_007849
2007_007878
2007_007881
2007_007890
2007_007891
2007_007902
2007_007908
2007_007930
2007_007947
2007_007948
2007_007996
2007_008043
2007_008051
2007_008072
2007_008084
2007_008085
2007_008106
2007_008110
2007_008140
2007_008142
2007_008203
2007_008204
2007_008218
2007_008219
2007_008222
2007_008256
2007_008260
2007_008307
2007_008339
2007_008374
2007_008403
2007_008407
2007_008415
2007_008430
2007_008468
2007_008526
2007_008543
2007_008547
2007_008571
2007_008575
2007_008596
2007_008645
2007_008670
2007_008708
2007_008714
2007_008722
2007_008747
2007_008764
2007_008778
2007_008801
2007_008802
2007_008815
2007_008821
2007_008897
2007_008927
2007_008932
2007_008944
2007_008945
2007_008948
2007_008964
2007_008973
2007_008980
2007_008994
2007_009015
2007_009030
2007_009052
2007_009068
2007_009082
2007_009084
2007_009088
2007_009096
2007_009139
2007_009209
2007_009216
2007_009221
2007_009245
2007_009251
2007_009252
2007_009258
2007_009295
2007_009320
2007_009322
2007_009323
2007_009327
2007_009331
2007_009346
2007_009348
2007_009392
2007_009413
2007_009419
2007_009422
2007_009435
2007_009436
2007_009446
2007_009458
2007_009464
2007_009521
2007_009527
2007_009533
2007_009550
2007_009554
2007_009562
2007_009580
2007_009592
2007_009594
2007_009597
2007_009605
2007_009607
2007_009618
2007_009630
2007_009649
2007_009654
2007_009655
2007_009665
2007_009684
2007_009687
2007_009691
2007_009706
2007_009709
2007_009724
2007_009750
2007_009756
2007_009759
2007_009764
2007_009779
2007_009788
2007_009794
2007_009807
2007_009817
2007_009832
2007_009841
2007_009889
2007_009897
2007_009899
2007_009901
2007_009911
2007_009923
2007_009938
2007_009947
2007_009950
2008_000009
2008_000015
2008_000016
2008_000019
2008_000028
2008_000033
2008_000073
2008_000074
2008_000075
2008_000080
2008_000089
2008_000103
2008_000105
2008_000107
2008_000120
2008_000123
2008_000131
2008_000144
2008_000149
2008_000162
2008_000182
2008_000187
2008_000188
2008_000197
2008_000207
2008_000213
2008_000215
2008_000217
2008_000223
2008_000226
2008_000233
2008_000234
2008_000235
2008_000238
2008_000239
2008_000254
2008_000259
2008_000270
2008_000271
2008_000273
2008_000284
2008_000287
2008_000289
2008_000290
2008_000309
2008_000316
2008_000336
2008_000345
2008_000348
2008_000359
2008_000361
2008_000365
2008_000391
2008_000399
2008_000400
2008_000401
2008_000415
2008_000422
2008_000436
2008_000464
2008_000469
2008_000470
2008_000474
2008_000491
2008_000495
2008_000501
2008_000505
2008_000510
2008_000515
2008_000533
2008_000540
2008_000544
2008_000567
2008_000573
2008_000578
2008_000584
2008_000588
2008_000589
2008_000595
2008_000602
2008_000626
2008_000630
2008_000645
2008_000657
2008_000661
2008_000662
2008_000666
2008_000673
2008_000676
2008_000696
2008_000700
2008_000711
2008_000716
2008_000725
2008_000731
2008_000733
2008_000760
2008_000763
2008_000764
2008_000765
2008_000778
2008_000782
2008_000785
2008_000795
2008_000811
2008_000832
2008_000841
2008_000848
2008_000853
2008_000860
2008_000861
2008_000863
2008_000870
2008_000911
2008_000919
2008_000923
2008_000943
2008_000992
2008_001013
2008_001028
2008_001030
2008_001040
2008_001056
2008_001070
2008_001074
2008_001076
2008_001078
2008_001106
2008_001112
2008_001118
2008_001119
2008_001135
2008_001137
2008_001150
2008_001159
2008_001169
2008_001170
2008_001188
2008_001203
2008_001208
2008_001215
2008_001231
2008_001235
2008_001245
2008_001249
2008_001260
2008_001263
2008_001274
2008_001283
2008_001308
2008_001358
2008_001375
2008_001379
2008_001387
2008_001399
2008_001402
2008_001404
2008_001408
2008_001413
2008_001433
2008_001439
2008_001462
2008_001467
2008_001478
2008_001479
2008_001491
2008_001498
2008_001504
2008_001510
2008_001513
2008_001514
2008_001523
2008_001531
2008_001546
2008_001547
2008_001566
2008_001580
2008_001592
2008_001601
2008_001610
2008_001629
2008_001632
2008_001640
2008_001643
2008_001682
2008_001688
2008_001691
2008_001715
2008_001716
2008_001719
2008_001741
2008_001761
2008_001787
2008_001821
2008_001829
2008_001874
2008_001876
2008_001882
2008_001885
2008_001895
2008_001896
2008_001926
2008_001966
2008_001971
2008_001992
2008_001997
2008_002032
2008_002043
2008_002064
2008_002066
2008_002067
2008_002073
2008_002079
2008_002080
2008_002123
2008_002152
2008_002160
2008_002175
2008_002177
2008_002182
2008_002200
2008_002205
2008_002210
2008_002212
2008_002215
2008_002218
2008_002221
2008_002239
2008_002240
2008_002241
2008_002247
2008_002248
2008_002255
2008_002258
2008_002269
2008_002273
2008_002288
2008_002338
2008_002358
2008_002379
2008_002383
2008_002411
2008_002425
2008_002429
2008_002464
2008_002467
2008_002471
2008_002473
2008_002492
2008_002495
2008_002504
2008_002521
2008_002536
2008_002551
2008_002588
2008_002623
2008_002641
2008_002650
2008_002680
2008_002681
2008_002697
2008_002704
2008_002710
2008_002719
2008_002749
2008_002762
2008_002772
2008_002775
2008_002778
2008_002834
2008_002835
2008_002859
2008_002864
2008_002868
2008_002885
2008_002894
2008_002900
2008_002904
2008_002929
2008_002936
2008_002942
2008_002958
2008_002960
2008_002970
2008_002972
2008_002993
2008_003003
2008_003026
2008_003034
2008_003060
2008_003065
2008_003068
2008_003076
2008_003083
2008_003087
2008_003094
2008_003101
2008_003105
2008_003108
2008_003110
2008_003135
2008_003141
2008_003155
2008_003168
2008_003180
2008_003196
2008_003200
2008_003208
2008_003210
2008_003238
2008_003252
2008_003270
2008_003329
2008_003330
2008_003333
2008_003362
2008_003369
2008_003373
2008_003379
2008_003381
2008_003415
2008_003429
2008_003451
2008_003461
2008_003477
2008_003480
2008_003492
2008_003499
2008_003500
2008_003511
2008_003523
2008_003546
2008_003562
2008_003576
2008_003577
2008_003585
2008_003665
2008_003676
2008_003691
2008_003701
2008_003703
2008_003709
2008_003729
2008_003733
2008_003769
2008_003774
2008_003777
2008_003779
2008_003782
2008_003814
2008_003821
2008_003846
2008_003856
2008_003858
2008_003874
2008_003876
2008_003885
2008_003886
2008_003913
2008_003926
2008_003939
2008_003947
2008_003976
2008_003986
2008_003998
2008_004014
2008_004026
2008_004055
2008_004069
2008_004080
2008_004097
2008_004101
2008_004112
2008_004140
2008_004172
2008_004175
2008_004212
2008_004259
2008_004279
2008_004321
2008_004339
2008_004345
2008_004358
2008_004363
2008_004365
2008_004367
2008_004396
2008_004399
2008_004416
2008_004430
2008_004441
2008_004453
2008_004477
2008_004547
2008_004551
2008_004552
2008_004562
2008_004575
2008_004583
2008_004588
2008_004607
2008_004610
2008_004612
2008_004621
2008_004624
2008_004654
2008_004659
2008_004663
2008_004687
2008_004701
2008_004704
2008_004705
2008_004750
2008_004754
2008_004758
2008_004776
2008_004822
2008_004838
2008_004841
2008_004854
2008_004869
2008_004892
2008_004910
2008_004911
2008_004914
2008_004946
2008_004983
2008_004995
2008_005006
2008_005049
2008_005074
2008_005089
2008_005097
2008_005105
2008_005145
2008_005196
2008_005197
2008_005214
2008_005217
2008_005231
2008_005242
2008_005245
2008_005254
2008_005262
2008_005266
2008_005294
2008_005300
2008_005321
2008_005338
2008_005342
2008_005345
2008_005367
2008_005375
2008_005398
2008_005399
2008_005422
2008_005439
2008_005445
2008_005512
2008_005525
2008_005541
2008_005544
2008_005600
2008_005628
2008_005633
2008_005637
2008_005642
2008_005650
2008_005668
2008_005676
2008_005678
2008_005679
2008_005680
2008_005691
2008_005698
2008_005706
2008_005713
2008_005714
2008_005716
2008_005727
2008_005738
2008_005747
2008_005770
2008_005812
2008_005839
2008_005843
2008_005845
2008_005874
2008_005904
2008_005915
2008_005926
2008_005938
2008_005945
2008_005953
2008_006008
2008_006032
2008_006036
2008_006055
2008_006063
2008_006065
2008_006070
2008_006108
2008_006130
2008_006140
2008_006143
2008_006159
2008_006182
2008_006213
2008_006215
2008_006216
2008_006219
2008_006221
2008_006229
2008_006254
2008_006275
2008_006289
2008_006325
2008_006327
2008_006339
2008_006341
2008_006345
2008_006349
2008_006353
2008_006389
2008_006408
2008_006434
2008_006480
2008_006481
2008_006482
2008_006490
2008_006509
2008_006523
2008_006526
2008_006528
2008_006553
2008_006554
2008_006558
2008_006655
2008_006703
2008_006722
2008_006748
2008_006751
2008_006752
2008_006784
2008_006835
2008_006843
2008_006873
2008_006874
2008_006877
2008_006908
2008_006920
2008_006981
2008_006986
2008_007011
2008_007012
2008_007025
2008_007031
2008_007048
2008_007090
2008_007120
2008_007123
2008_007142
2008_007143
2008_007165
2008_007194
2008_007201
2008_007219
2008_007239
2008_007242
2008_007245
2008_007273
2008_007313
2008_007350
2008_007355
2008_007357
2008_007375
2008_007378
2008_007392
2008_007402
2008_007428
2008_007433
2008_007472
2008_007497
2008_007498
2008_007507
2008_007513
2008_007527
2008_007548
2008_007581
2008_007596
2008_007677
2008_007691
2008_007737
2008_007759
2008_007797
2008_007804
2008_007811
2008_007814
2008_007828
2008_007836
2008_007858
2008_007945
2008_007994
2008_007998
2008_008051
2008_008103
2008_008106
2008_008127
2008_008193
2008_008221
2008_008252
2008_008263
2008_008268
2008_008296
2008_008301
2008_008323
2008_008324
2008_008335
2008_008343
2008_008362
2008_008392
2008_008393
2008_008421
2008_008434
2008_008462
2008_008469
2008_008476
2008_008511
2008_008521
2008_008525
2008_008541
2008_008545
2008_008550
2008_008629
2008_008682
2008_008711
2008_008746
2008_008770
2008_008773
2009_000006
2009_000012
2009_000013
2009_000015
2009_000022
2009_000028
2009_000029
2009_000032
2009_000037
2009_000039
2009_000073
2009_000074
2009_000080
2009_000087
2009_000096
2009_000100
2009_000103
2009_000121
2009_000133
2009_000136
2009_000149
2009_000156
2009_000161
2009_000176
2009_000177
2009_000201
2009_000205
2009_000219
2009_000242
2009_000250
2009_000285
2009_000309
2009_000318
2009_000335
2009_000347
2009_000351
2009_000354
2009_000385
2009_000387
2009_000391
2009_000400
2009_000405
2009_000408
2009_000409
2009_000412
2009_000418
2009_000420
2009_000421
2009_000426
2009_000440
2009_000444
2009_000446
2009_000454
2009_000455
2009_000457
2009_000469
2009_000487
2009_000488
2009_000503
2009_000505
2009_000523
2009_000532
2009_000535
2009_000544
2009_000553
2009_000562
2009_000573
2009_000603
2009_000619
2009_000626
2009_000628
2009_000635
2009_000641
2009_000655
2009_000662
2009_000664
2009_000675
2009_000684
2009_000690
2009_000704
2009_000705
2009_000709
2009_000712
2009_000716
2009_000720
2009_000723
2009_000727
2009_000730
2009_000731
2009_000732
2009_000744
2009_000746
2009_000771
2009_000774
2009_000801
2009_000825
2009_000828
2009_000839
2009_000840
2009_000845
2009_000879
2009_000887
2009_000892
2009_000894
2009_000895
2009_000906
2009_000919
2009_000924
2009_000931
2009_000935
2009_000938
2009_000964
2009_000987
2009_000989
2009_000991
2009_000996
2009_000998
2009_001002
2009_001008
2009_001019
2009_001027
2009_001036
2009_001070
2009_001082
2009_001085
2009_001095
2009_001096
2009_001100
2009_001104
2009_001108
2009_001117
2009_001124
2009_001137
2009_001140
2009_001145
2009_001146
2009_001160
2009_001163
2009_001177
2009_001197
2009_001203
2009_001205
2009_001215
2009_001240
2009_001251
2009_001253
2009_001255
2009_001264
2009_001268
2009_001270
2009_001278
2009_001283
2009_001299
2009_001300
2009_001306
2009_001311
2009_001314
2009_001332
2009_001333
2009_001339
2009_001359
2009_001363
2009_001385
2009_001388
2009_001390
2009_001391
2009_001403
2009_001411
2009_001422
2009_001433
2009_001443
2009_001444
2009_001481
2009_001502
2009_001505
2009_001514
2009_001516
2009_001535
2009_001536
2009_001544
2009_001565
2009_001607
2009_001615
2009_001625
2009_001636
2009_001640
2009_001644
2009_001651
2009_001663
2009_001664
2009_001683
2009_001684
2009_001687
2009_001690
2009_001693
2009_001718
2009_001724
2009_001731
2009_001735
2009_001744
2009_001755
2009_001765
2009_001768
2009_001775
2009_001782
2009_001783
2009_001802
2009_001804
2009_001816
2009_001818
2009_001828
2009_001850
2009_001851
2009_001854
2009_001868
2009_001871
2009_001885
2009_001888
2009_001894
2009_001898
2009_001922
2009_001937
2009_001941
2009_001961
2009_001964
2009_001972
2009_001991
2009_002010
2009_002012
2009_002019
2009_002035
2009_002042
2009_002052
2009_002060
2009_002072
2009_002082
2009_002083
2009_002094
2009_002097
2009_002117
2009_002122
2009_002150
2009_002153
2009_002155
2009_002164
2009_002165
2009_002171
2009_002185
2009_002202
2009_002204
2009_002216
2009_002221
2009_002229
2009_002238
2009_002239
2009_002245
2009_002262
2009_002264
2009_002265
2009_002268
2009_002281
2009_002285
2009_002291
2009_002295
2009_002314
2009_002317
2009_002320
2009_002343
2009_002346
2009_002362
2009_002366
2009_002372
2009_002382
2009_002387
2009_002390
2009_002409
2009_002415
2009_002416
2009_002419
2009_002422
2009_002423
2009_002425
2009_002445
2009_002448
2009_002460
2009_002472
2009_002487
2009_002519
2009_002521
2009_002527
2009_002530
2009_002535
2009_002539
2009_002543
2009_002549
2009_002562
2009_002567
2009_002568
2009_002571
2009_002573
2009_002584
2009_002586
2009_002588
2009_002591
2009_002594
2009_002599
2009_002604
2009_002613
2009_002618
2009_002626
2009_002628
2009_002635
2009_002638
2009_002649
2009_002651
2009_002662
2009_002674
2009_002713
2009_002715
2009_002727
2009_002732
2009_002734
2009_002749
2009_002753
2009_002763
2009_002771
2009_002789
2009_002808
2009_002820
2009_002844
2009_002845
2009_002849
2009_002856
2009_002862
2009_002872
2009_002885
2009_002887
2009_002888
2009_002897
2009_002912
2009_002914
2009_002917
2009_002928
2009_002932
2009_002936
2009_002972
2009_002975
2009_002982
2009_002984
2009_002988
2009_002990
2009_002993
2009_003003
2009_003005
2009_003006
2009_003007
2009_003012
2009_003034
2009_003035
2009_003039
2009_003043
2009_003053
2009_003054
2009_003059
2009_003063
2009_003065
2009_003071
2009_003075
2009_003080
2009_003087
2009_003088
2009_003090
2009_003105
2009_003123
2009_003142
2009_003146
2009_003147
2009_003164
2009_003172
2009_003193
2009_003196
2009_003200
2009_003217
2009_003224
2009_003241
2009_003249
2009_003269
2009_003273
2009_003299
2009_003304
2009_003311
2009_003317
2009_003323
2009_003340
2009_003343
2009_003345
2009_003353
2009_003361
2009_003369
2009_003378
2009_003387
2009_003406
2009_003433
2009_003450
2009_003455
2009_003461
2009_003466
2009_003468
2009_003481
2009_003494
2009_003497
2009_003498
2009_003504
2009_003507
2009_003517
2009_003519
2009_003522
2009_003523
2009_003539
2009_003542
2009_003549
2009_003551
2009_003555
2009_003564
2009_003569
2009_003576
2009_003589
2009_003607
2009_003613
2009_003636
2009_003640
2009_003646
2009_003660
2009_003666
2009_003690
2009_003696
2009_003697
2009_003703
2009_003707
2009_003711
2009_003734
2009_003736
2009_003756
2009_003757
2009_003768
2009_003771
2009_003773
2009_003783
2009_003799
2009_003804
2009_003806
2009_003810
2009_003815
2009_003820
2009_003825
2009_003849
2009_003857
2009_003858
2009_003860
2009_003865
2009_003895
2009_003903
2009_003904
2009_003921
2009_003922
2009_003928
2009_003933
2009_003938
2009_003961
2009_003971
2009_003975
2009_003991
2009_004021
2009_004033
2009_004043
2009_004070
2009_004072
2009_004084
2009_004091
2009_004095
2009_004099
2009_004105
2009_004117
2009_004125
2009_004140
2009_004171
2009_004178
2009_004180
2009_004186
2009_004191
2009_004212
2009_004213
2009_004217
2009_004221
2009_004228
2009_004247
2009_004248
2009_004249
2009_004255
2009_004264
2009_004278
2009_004298
2009_004301
2009_004316
2009_004317
2009_004324
2009_004327
2009_004328
2009_004334
2009_004336
2009_004368
2009_004374
2009_004409
2009_004417
2009_004425
2009_004426
2009_004434
2009_004446
2009_004455
2009_004464
2009_004479
2009_004494
2009_004497
2009_004504
2009_004507
2009_004509
2009_004519
2009_004539
2009_004540
2009_004561
2009_004568
2009_004579
2009_004581
2009_004590
2009_004592
2009_004594
2009_004620
2009_004626
2009_004635
2009_004643
2009_004653
2009_004656
2009_004661
2009_004674
2009_004687
2009_004705
2009_004721
2009_004730
2009_004732
2009_004738
2009_004748
2009_004789
2009_004790
2009_004799
2009_004801
2009_004805
2009_004829
2009_004848
2009_004859
2009_004867
2009_004882
2009_004886
2009_004887
2009_004888
2009_004890
2009_004895
2009_004901
2009_004904
2009_004919
2009_004939
2009_004942
2009_004969
2009_004980
2009_004987
2009_004990
2009_004993
2009_004994
2009_005000
2009_005016
2009_005031
2009_005037
2009_005038
2009_005055
2009_005056
2009_005069
2009_005078
2009_005084
2009_005085
2009_005087
2009_005089
2009_005107
2009_005118
2009_005120
2009_005128
2009_005130
2009_005137
2009_005141
2009_005145
2009_005148
2009_005156
2009_005158
2009_005160
2009_005177
2009_005189
2009_005190
2009_005194
2009_005217
2009_005219
2009_005220
2009_005231
2009_005234
2009_005236
2009_005247
2009_005260
2009_005262
2009_005269
2009_005287
2009_005302
2010_000002
2010_000003
2010_000038
2010_000043
2010_000063
2010_000065
2010_000075
2010_000076
2010_000083
2010_000084
2010_000087
2010_000110
2010_000114
2010_000117
2010_000131
2010_000132
2010_000148
2010_000159
2010_000160
2010_000163
2010_000174
2010_000187
2010_000189
2010_000195
2010_000216
2010_000238
2010_000241
2010_000256
2010_000269
2010_000272
2010_000284
2010_000285
2010_000309
2010_000318
2010_000330
2010_000335
2010_000342
2010_000371
2010_000372
2010_000392
2010_000404
2010_000422
2010_000426
2010_000427
2010_000436
2010_000437
2010_000466
2010_000469
2010_000492
2010_000498
2010_000502
2010_000503
2010_000519
2010_000530
2010_000552
2010_000559
2010_000567
2010_000572
2010_000573
2010_000588
2010_000622
2010_000628
2010_000632
2010_000639
2010_000661
2010_000666
2010_000675
2010_000679
2010_000682
2010_000683
2010_000685
2010_000724
2010_000738
2010_000746
2010_000748
2010_000764
2010_000772
2010_000787
2010_000788
2010_000810
2010_000814
2010_000815
2010_000836
2010_000847
2010_000855
2010_000874
2010_000885
2010_000887
2010_000904
2010_000906
2010_000907
2010_000918
2010_000929
2010_000941
2010_000952
2010_000961
2010_000978
2010_000986
2010_001000
2010_001010
2010_001011
2010_001016
2010_001017
2010_001024
2010_001036
2010_001043
2010_001061
2010_001069
2010_001070
2010_001079
2010_001104
2010_001120
2010_001124
2010_001131
2010_001149
2010_001151
2010_001154
2010_001160
2010_001174
2010_001177
2010_001183
2010_001184
2010_001195
2010_001206
2010_001245
2010_001246
2010_001247
2010_001251
2010_001256
2010_001261
2010_001264
2010_001273
2010_001279
2010_001282
2010_001292
2010_001313
2010_001327
2010_001329
2010_001331
2010_001347
2010_001351
2010_001367
2010_001374
2010_001376
2010_001386
2010_001399
2010_001403
2010_001413
2010_001418
2010_001422
2010_001448
2010_001451
2010_001457
2010_001514
2010_001515
2010_001522
2010_001534
2010_001553
2010_001557
2010_001561
2010_001562
2010_001563
2010_001576
2010_001577
2010_001579
2010_001590
2010_001595
2010_001618
2010_001619
2010_001630
2010_001646
2010_001656
2010_001660
2010_001676
2010_001692
2010_001699
2010_001706
2010_001732
2010_001734
2010_001748
2010_001752
2010_001767
2010_001768
2010_001773
2010_001807
2010_001820
2010_001830
2010_001842
2010_001849
2010_001850
2010_001851
2010_001852
2010_001860
2010_001908
2010_001913
2010_001922
2010_001923
2010_001933
2010_001939
2010_001944
2010_001951
2010_001956
2010_001962
2010_001966
2010_001995
2010_002017
2010_002018
2010_002020
2010_002025
2010_002030
2010_002032
2010_002039
2010_002047
2010_002054
2010_002055
2010_002070
2010_002097
2010_002106
2010_002107
2010_002137
2010_002139
2010_002142
2010_002146
2010_002147
2010_002150
2010_002154
2010_002161
2010_002166
2010_002200
2010_002203
2010_002218
2010_002228
2010_002232
2010_002236
2010_002251
2010_002254
2010_002271
2010_002286
2010_002305
2010_002310
2010_002336
2010_002338
2010_002348
2010_002361
2010_002363
2010_002379
2010_002382
2010_002387
2010_002390
2010_002396
2010_002413
2010_002418
2010_002422
2010_002440
2010_002450
2010_002455
2010_002457
2010_002480
2010_002499
2010_002512
2010_002527
2010_002531
2010_002532
2010_002536
2010_002538
2010_002546
2010_002551
2010_002556
2010_002570
2010_002573
2010_002623
2010_002625
2010_002659
2010_002682
2010_002691
2010_002693
2010_002697
2010_002701
2010_002720
2010_002733
2010_002750
2010_002763
2010_002778
2010_002786
2010_002792
2010_002794
2010_002811
2010_002815
2010_002838
2010_002856
2010_002868
2010_002870
2010_002892
2010_002900
2010_002902
2010_002907
2010_002921
2010_002929
2010_002935
2010_002937
2010_002938
2010_002939
2010_002962
2010_002973
2010_002988
2010_003010
2010_003014
2010_003017
2010_003060
2010_003062
2010_003088
2010_003093
2010_003097
2010_003114
2010_003119
2010_003123
2010_003127
2010_003132
2010_003153
2010_003157
2010_003168
2010_003170
2010_003174
2010_003183
2010_003187
2010_003203
2010_003207
2010_003230
2010_003231
2010_003239
2010_003250
2010_003252
2010_003269
2010_003274
2010_003275
2010_003276
2010_003293
2010_003302
2010_003325
2010_003342
2010_003345
2010_003362
2010_003365
2010_003380
2010_003381
2010_003383
2010_003384
2010_003402
2010_003409
2010_003418
2010_003446
2010_003453
2010_003468
2010_003473
2010_003495
2010_003506
2010_003514
2010_003529
2010_003531
2010_003532
2010_003534
2010_003541
2010_003547
2010_003597
2010_003599
2010_003634
2010_003651
2010_003665
2010_003670
2010_003675
2010_003680
2010_003696
2010_003708
2010_003716
2010_003717
2010_003737
2010_003746
2010_003758
2010_003764
2010_003768
2010_003771
2010_003772
2010_003781
2010_003798
2010_003799
2010_003813
2010_003820
2010_003854
2010_003884
2010_003887
2010_003894
2010_003899
2010_003911
2010_003912
2010_003915
2010_003925
2010_003947
2010_003950
2010_003954
2010_003956
2010_003958
2010_003971
2010_003974
2010_004005
2010_004025
2010_004041
2010_004042
2010_004056
2010_004060
2010_004063
2010_004069
2010_004071
2010_004072
2010_004074
2010_004104
2010_004109
2010_004119
2010_004120
2010_004144
2010_004149
2010_004154
2010_004165
2010_004171
2010_004180
2010_004186
2010_004208
2010_004210
2010_004219
2010_004222
2010_004226
2010_004258
2010_004283
2010_004288
2010_004289
2010_004306
2010_004314
2010_004320
2010_004322
2010_004337
2010_004348
2010_004355
2010_004361
2010_004363
2010_004365
2010_004369
2010_004370
2010_004382
2010_004419
2010_004429
2010_004432
2010_004450
2010_004472
2010_004478
2010_004479
2010_004481
2010_004493
2010_004499
2010_004519
2010_004520
2010_004529
2010_004540
2010_004543
2010_004550
2010_004551
2010_004556
2010_004559
2010_004560
2010_004577
2010_004598
2010_004616
2010_004620
2010_004625
2010_004628
2010_004635
2010_004662
2010_004669
2010_004683
2010_004694
2010_004697
2010_004704
2010_004721
2010_004757
2010_004760
2010_004763
2010_004766
2010_004772
2010_004773
2010_004783
2010_004789
2010_004795
2010_004805
2010_004808
2010_004815
2010_004825
2010_004828
2010_004856
2010_004857
2010_004861
2010_004900
2010_004916
2010_004933
2010_004938
2010_004941
2010_004946
2010_004948
2010_004951
2010_004960
2010_004963
2010_004980
2010_004994
2010_005013
2010_005016
2010_005021
2010_005028
2010_005046
2010_005055
2010_005063
2010_005064
2010_005098
2010_005106
2010_005108
2010_005111
2010_005118
2010_005119
2010_005128
2010_005129
2010_005159
2010_005160
2010_005166
2010_005174
2010_005180
2010_005187
2010_005198
2010_005202
2010_005206
2010_005217
2010_005223
2010_005232
2010_005245
2010_005252
2010_005277
2010_005284
2010_005305
2010_005317
2010_005318
2010_005344
2010_005353
2010_005366
2010_005401
2010_005419
2010_005421
2010_005428
2010_005429
2010_005432
2010_005433
2010_005450
2010_005457
2010_005468
2010_005471
2010_005494
2010_005496
2010_005500
2010_005501
2010_005505
2010_005506
2010_005508
2010_005513
2010_005519
2010_005522
2010_005531
2010_005534
2010_005575
2010_005582
2010_005596
2010_005606
2010_005626
2010_005627
2010_005643
2010_005644
2010_005652
2010_005663
2010_005664
2010_005669
2010_005678
2010_005700
2010_005705
2010_005706
2010_005709
2010_005718
2010_005719
2010_005721
2010_005723
2010_005725
2010_005727
2010_005734
2010_005744
2010_005746
2010_005755
2010_005758
2010_005762
2010_005775
2010_005788
2010_005791
2010_005796
2010_005800
2010_005805
2010_005810
2010_005820
2010_005830
2010_005835
2010_005836
2010_005860
2010_005871
2010_005876
2010_005877
2010_005888
2010_005891
2010_005898
2010_005899
2010_005919
2010_005922
2010_005927
2010_005932
2010_005951
2010_005952
2010_005978
2010_005982
2010_005991
2010_005992
2010_006009
2010_006026
2010_006034
2010_006054
2010_006070
2011_000003
2011_000006
2011_000025
2011_000027
2011_000045
2011_000051
2011_000054
2011_000066
2011_000068
2011_000069
2011_000070
2011_000105
2011_000108
2011_000112
2011_000116
2011_000122
2011_000145
2011_000149
2011_000152
2011_000173
2011_000178
2011_000182
2011_000185
2011_000197
2011_000208
2011_000216
2011_000219
2011_000221
2011_000222
2011_000226
2011_000228
2011_000234
2011_000238
2011_000239
2011_000243
2011_000248
2011_000252
2011_000258
2011_000268
2011_000277
2011_000278
2011_000283
2011_000291
2011_000293
2011_000310
2011_000312
2011_000338
2011_000345
2011_000359
2011_000379
2011_000382
2011_000396
2011_000400
2011_000412
2011_000419
2011_000428
2011_000435
2011_000436
2011_000438
2011_000449
2011_000453
2011_000455
2011_000456
2011_000457
2011_000468
2011_000469
2011_000479
2011_000481
2011_000482
2011_000503
2011_000512
2011_000513
2011_000521
2011_000526
2011_000536
2011_000542
2011_000548
2011_000550
2011_000551
2011_000556
2011_000566
2011_000573
2011_000577
2011_000585
2011_000589
2011_000594
2011_000598
2011_000607
2011_000618
2011_000637
2011_000638
2011_000641
2011_000642
2011_000646
2011_000651
2011_000652
2011_000658
2011_000661
2011_000669
2011_000713
2011_000747
2011_000758
2011_000768
2011_000771
2011_000780
2011_000789
2011_000790
2011_000793
2011_000807
2011_000809
2011_000813
2011_000830
2011_000834
2011_000840
2011_000843
2011_000874
2011_000882
2011_000888
2011_000893
2011_000895
2011_000900
2011_000912
2011_000920
2011_000934
2011_000944
2011_000953
2011_000969
2011_000973
2011_000982
2011_000997
2011_000999
2011_001004
2011_001005
2011_001014
2011_001015
2011_001020
2011_001027
2011_001047
2011_001060
2011_001064
2011_001069
2011_001071
2011_001082
2011_001110
2011_001114
2011_001133
2011_001135
2011_001139
2011_001159
2011_001161
2011_001166
2011_001175
2011_001190
2011_001198
2011_001211
2011_001232
2011_001259
2011_001263
2011_001270
2011_001276
2011_001281
2011_001287
2011_001292
2011_001313
2011_001336
2011_001341
2011_001346
2011_001350
2011_001400
2011_001402
2011_001407
2011_001411
2011_001412
2011_001416
2011_001421
2011_001432
2011_001434
2011_001447
2011_001463
2011_001475
2011_001479
2011_001489
2011_001519
2011_001529
2011_001530
2011_001534
2011_001536
2011_001542
2011_001546
2011_001567
2011_001571
2011_001589
2011_001597
2011_001601
2011_001607
2011_001613
2011_001614
2011_001619
2011_001621
2011_001622
2011_001624
2011_001632
2011_001642
2011_001652
2011_001653
2011_001665
2011_001669
2011_001674
2011_001695
2011_001708
2011_001710
2011_001713
2011_001714
2011_001722
2011_001726
2011_001730
2011_001745
2011_001748
2011_001753
2011_001754
2011_001764
2011_001765
2011_001775
2011_001782
2011_001790
2011_001793
2011_001794
2011_001810
2011_001812
2011_001855
2011_001862
2011_001863
2011_001866
2011_001868
2011_001875
2011_001880
2011_001895
2011_001902
2011_001904
2011_001910
2011_001922
2011_001924
2011_001928
2011_001959
2011_001967
2011_001972
2011_001974
2011_001984
2011_001988
2011_001991
2011_002002
2011_002027
2011_002040
2011_002041
2011_002050
2011_002064
2011_002075
2011_002098
2011_002107
2011_002110
2011_002111
2011_002114
2011_002119
2011_002121
2011_002124
2011_002134
2011_002135
2011_002149
2011_002150
2011_002156
2011_002178
2011_002200
2011_002222
2011_002223
2011_002224
2011_002227
2011_002244
2011_002246
2011_002247
2011_002279
2011_002291
2011_002295
2011_002298
2011_002300
2011_002303
2011_002308
2011_002317
2011_002322
2011_002327
2011_002335
2011_002341
2011_002343
2011_002350
2011_002358
2011_002371
2011_002379
2011_002381
2011_002385
2011_002389
2011_002391
2011_002398
2011_002410
2011_002447
2011_002457
2011_002464
2011_002488
2011_002498
2011_002503
2011_002504
2011_002509
2011_002511
2011_002515
2011_002528
2011_002532
2011_002535
2011_002548
2011_002553
2011_002559
2011_002561
2011_002575
2011_002578
2011_002585
2011_002589
2011_002590
2011_002592
2011_002623
2011_002641
2011_002644
2011_002652
2011_002656
2011_002662
2011_002675
2011_002685
2011_002709
2011_002713
2011_002715
2011_002717
2011_002730
2011_002752
2011_002754
2011_002767
2011_002770
2011_002812
2011_002834
2011_002851
2011_002863
2011_002872
2011_002873
2011_002879
2011_002885
2011_002920
2011_002929
2011_002932
2011_002935
2011_002947
2011_002951
2011_002953
2011_002956
2011_002975
2011_002993
2011_002997
2011_003003
2011_003011
2011_003019
2011_003025
2011_003030
2011_003038
2011_003055
2011_003057
2011_003066
2011_003078
2011_003085
2011_003103
2011_003114
2011_003121
2011_003141
2011_003145
2011_003146
2011_003151
2011_003182
2011_003184
2011_003197
2011_003205
2011_003216
2011_003238
2011_003240
2011_003246
2011_003255
2011_003256
2011_003271
2007_000033 15
2007_000042 \ No newline at end of file
2007_000061
2007_000123
2007_000129
2007_000175
2007_000187
2007_000323
2007_000332
2007_000346
2007_000452
2007_000464
2007_000491
2007_000529
2007_000559
2007_000572
2007_000629
2007_000636
2007_000661
2007_000663
2007_000676
2007_000727
2007_000762
2007_000783
2007_000799
2007_000804
2007_000830
2007_000837
2007_000847
2007_000862
2007_000925
2007_000999
2007_001154
2007_001175
2007_001239
2007_001284
2007_001288
2007_001289
2007_001299
2007_001311
2007_001321
2007_001377
2007_001408
2007_001423
2007_001430
2007_001457
2007_001458
2007_001526
2007_001568
2007_001585
2007_001586
2007_001587
2007_001594
2007_001630
2007_001677
2007_001678
2007_001717
2007_001733
2007_001761
2007_001763
2007_001774
2007_001884
2007_001955
2007_002046
2007_002094
2007_002119
2007_002132
2007_002260
2007_002266
2007_002268
2007_002284
2007_002376
2007_002378
2007_002387
2007_002400
2007_002412
2007_002426
2007_002427
2007_002445
2007_002470
2007_002539
2007_002565
2007_002597
2007_002618
2007_002619
2007_002624
2007_002643
2007_002648
2007_002719
2007_002728
2007_002823
2007_002824
2007_002852
2007_002903
2007_003011
2007_003020
2007_003022
2007_003051
2007_003088
2007_003101
2007_003106
2007_003110
2007_003131
2007_003134
2007_003137
2007_003143
2007_003169
2007_003188
2007_003194
2007_003195
2007_003201
2007_003349
2007_003367
2007_003373
2007_003499
2007_003503
2007_003506
2007_003530
2007_003571
2007_003587
2007_003611
2007_003621
2007_003682
2007_003711
2007_003714
2007_003742
2007_003786
2007_003841
2007_003848
2007_003861
2007_003872
2007_003917
2007_003957
2007_003991
2007_004033
2007_004052
2007_004112
2007_004121
2007_004143
2007_004189
2007_004190
2007_004193
2007_004241
2007_004275
2007_004281
2007_004380
2007_004392
2007_004405
2007_004468
2007_004483
2007_004510
2007_004538
2007_004558
2007_004644
2007_004649
2007_004712
2007_004722
2007_004856
2007_004866
2007_004902
2007_004969
2007_005058
2007_005074
2007_005107
2007_005114
2007_005149
2007_005173
2007_005281
2007_005294
2007_005296
2007_005304
2007_005331
2007_005354
2007_005358
2007_005428
2007_005460
2007_005469
2007_005509
2007_005547
2007_005600
2007_005608
2007_005626
2007_005689
2007_005696
2007_005705
2007_005759
2007_005803
2007_005813
2007_005828
2007_005844
2007_005845
2007_005857
2007_005911
2007_005915
2007_005978
2007_006028
2007_006035
2007_006046
2007_006076
2007_006086
2007_006117
2007_006171
2007_006241
2007_006260
2007_006277
2007_006348
2007_006364
2007_006373
2007_006444
2007_006449
2007_006549
2007_006553
2007_006560
2007_006647
2007_006678
2007_006680
2007_006698
2007_006761
2007_006802
2007_006837
2007_006841
2007_006864
2007_006866
2007_006946
2007_007007
2007_007084
2007_007109
2007_007130
2007_007165
2007_007168
2007_007195
2007_007196
2007_007203
2007_007211
2007_007235
2007_007341
2007_007414
2007_007417
2007_007470
2007_007477
2007_007493
2007_007498
2007_007524
2007_007534
2007_007624
2007_007651
2007_007688
2007_007748
2007_007795
2007_007810
2007_007815
2007_007818
2007_007836
2007_007849
2007_007881
2007_007996
2007_008051
2007_008084
2007_008106
2007_008110
2007_008204
2007_008222
2007_008256
2007_008260
2007_008339
2007_008374
2007_008415
2007_008430
2007_008543
2007_008547
2007_008596
2007_008645
2007_008670
2007_008708
2007_008722
2007_008747
2007_008802
2007_008815
2007_008897
2007_008944
2007_008964
2007_008973
2007_008980
2007_009015
2007_009068
2007_009084
2007_009088
2007_009096
2007_009221
2007_009245
2007_009251
2007_009252
2007_009258
2007_009320
2007_009323
2007_009331
2007_009346
2007_009392
2007_009413
2007_009419
2007_009446
2007_009458
2007_009521
2007_009562
2007_009592
2007_009654
2007_009655
2007_009684
2007_009687
2007_009691
2007_009706
2007_009750
2007_009756
2007_009764
2007_009794
2007_009817
2007_009841
2007_009897
2007_009911
2007_009923
2007_009938
2008_000009
2008_000016
2008_000073
2008_000075
2008_000080
2008_000107
2008_000120
2008_000123
2008_000149
2008_000182
2008_000213
2008_000215
2008_000223
2008_000233
2008_000234
2008_000239
2008_000254
2008_000270
2008_000271
2008_000345
2008_000359
2008_000391
2008_000401
2008_000464
2008_000469
2008_000474
2008_000501
2008_000510
2008_000533
2008_000573
2008_000589
2008_000602
2008_000630
2008_000657
2008_000661
2008_000662
2008_000666
2008_000673
2008_000700
2008_000725
2008_000731
2008_000763
2008_000765
2008_000782
2008_000795
2008_000811
2008_000848
2008_000853
2008_000863
2008_000911
2008_000919
2008_000943
2008_000992
2008_001013
2008_001028
2008_001040
2008_001070
2008_001074
2008_001076
2008_001078
2008_001135
2008_001150
2008_001170
2008_001231
2008_001249
2008_001260
2008_001283
2008_001308
2008_001379
2008_001404
2008_001433
2008_001439
2008_001478
2008_001491
2008_001504
2008_001513
2008_001514
2008_001531
2008_001546
2008_001547
2008_001580
2008_001629
2008_001640
2008_001682
2008_001688
2008_001715
2008_001821
2008_001874
2008_001885
2008_001895
2008_001966
2008_001971
2008_001992
2008_002043
2008_002152
2008_002205
2008_002212
2008_002239
2008_002240
2008_002241
2008_002269
2008_002273
2008_002358
2008_002379
2008_002383
2008_002429
2008_002464
2008_002467
2008_002492
2008_002495
2008_002504
2008_002521
2008_002536
2008_002588
2008_002623
2008_002680
2008_002681
2008_002775
2008_002778
2008_002835
2008_002859
2008_002864
2008_002900
2008_002904
2008_002929
2008_002936
2008_002942
2008_002958
2008_003003
2008_003026
2008_003034
2008_003076
2008_003105
2008_003108
2008_003110
2008_003135
2008_003141
2008_003155
2008_003210
2008_003238
2008_003270
2008_003330
2008_003333
2008_003369
2008_003379
2008_003451
2008_003461
2008_003477
2008_003492
2008_003499
2008_003511
2008_003546
2008_003576
2008_003577
2008_003676
2008_003709
2008_003733
2008_003777
2008_003782
2008_003821
2008_003846
2008_003856
2008_003858
2008_003874
2008_003876
2008_003885
2008_003886
2008_003926
2008_003976
2008_004069
2008_004101
2008_004140
2008_004172
2008_004175
2008_004212
2008_004279
2008_004339
2008_004345
2008_004363
2008_004367
2008_004396
2008_004399
2008_004453
2008_004477
2008_004552
2008_004562
2008_004575
2008_004610
2008_004612
2008_004621
2008_004624
2008_004654
2008_004659
2008_004687
2008_004701
2008_004704
2008_004705
2008_004754
2008_004758
2008_004854
2008_004910
2008_004995
2008_005049
2008_005089
2008_005097
2008_005105
2008_005145
2008_005197
2008_005217
2008_005242
2008_005245
2008_005254
2008_005262
2008_005338
2008_005398
2008_005399
2008_005422
2008_005439
2008_005445
2008_005525
2008_005544
2008_005628
2008_005633
2008_005637
2008_005642
2008_005676
2008_005680
2008_005691
2008_005727
2008_005738
2008_005812
2008_005904
2008_005915
2008_006008
2008_006036
2008_006055
2008_006063
2008_006108
2008_006130
2008_006143
2008_006159
2008_006216
2008_006219
2008_006229
2008_006254
2008_006275
2008_006325
2008_006327
2008_006341
2008_006408
2008_006480
2008_006523
2008_006526
2008_006528
2008_006553
2008_006554
2008_006703
2008_006722
2008_006752
2008_006784
2008_006835
2008_006874
2008_006981
2008_006986
2008_007025
2008_007031
2008_007048
2008_007120
2008_007123
2008_007143
2008_007194
2008_007219
2008_007273
2008_007350
2008_007378
2008_007392
2008_007402
2008_007497
2008_007498
2008_007507
2008_007513
2008_007527
2008_007548
2008_007596
2008_007677
2008_007737
2008_007797
2008_007804
2008_007811
2008_007814
2008_007828
2008_007836
2008_007945
2008_007994
2008_008051
2008_008103
2008_008127
2008_008221
2008_008252
2008_008268
2008_008296
2008_008301
2008_008335
2008_008362
2008_008392
2008_008393
2008_008421
2008_008434
2008_008469
2008_008629
2008_008682
2008_008711
2008_008746
2009_000012
2009_000013
2009_000022
2009_000032
2009_000037
2009_000039
2009_000074
2009_000080
2009_000087
2009_000096
2009_000121
2009_000136
2009_000149
2009_000156
2009_000201
2009_000205
2009_000219
2009_000242
2009_000309
2009_000318
2009_000335
2009_000351
2009_000354
2009_000387
2009_000391
2009_000412
2009_000418
2009_000421
2009_000426
2009_000440
2009_000446
2009_000455
2009_000457
2009_000469
2009_000487
2009_000488
2009_000523
2009_000573
2009_000619
2009_000628
2009_000641
2009_000664
2009_000675
2009_000704
2009_000705
2009_000712
2009_000716
2009_000723
2009_000727
2009_000730
2009_000731
2009_000732
2009_000771
2009_000825
2009_000828
2009_000839
2009_000840
2009_000845
2009_000879
2009_000892
2009_000919
2009_000924
2009_000931
2009_000935
2009_000964
2009_000989
2009_000991
2009_000998
2009_001008
2009_001082
2009_001108
2009_001160
2009_001215
2009_001240
2009_001255
2009_001278
2009_001299
2009_001300
2009_001314
2009_001332
2009_001333
2009_001363
2009_001391
2009_001411
2009_001433
2009_001505
2009_001535
2009_001536
2009_001565
2009_001607
2009_001644
2009_001663
2009_001683
2009_001684
2009_001687
2009_001718
2009_001731
2009_001765
2009_001768
2009_001775
2009_001804
2009_001816
2009_001818
2009_001850
2009_001851
2009_001854
2009_001941
2009_001991
2009_002012
2009_002035
2009_002042
2009_002082
2009_002094
2009_002097
2009_002122
2009_002150
2009_002155
2009_002164
2009_002165
2009_002171
2009_002185
2009_002202
2009_002221
2009_002238
2009_002239
2009_002265
2009_002268
2009_002291
2009_002295
2009_002317
2009_002320
2009_002346
2009_002366
2009_002372
2009_002382
2009_002390
2009_002415
2009_002445
2009_002487
2009_002521
2009_002527
2009_002535
2009_002539
2009_002549
2009_002562
2009_002568
2009_002571
2009_002573
2009_002584
2009_002591
2009_002594
2009_002604
2009_002618
2009_002635
2009_002638
2009_002649
2009_002651
2009_002727
2009_002732
2009_002749
2009_002753
2009_002771
2009_002808
2009_002856
2009_002887
2009_002888
2009_002928
2009_002936
2009_002975
2009_002982
2009_002990
2009_003003
2009_003005
2009_003043
2009_003059
2009_003063
2009_003065
2009_003071
2009_003080
2009_003105
2009_003123
2009_003193
2009_003196
2009_003217
2009_003224
2009_003241
2009_003269
2009_003273
2009_003299
2009_003304
2009_003311
2009_003323
2009_003343
2009_003378
2009_003387
2009_003406
2009_003433
2009_003450
2009_003466
2009_003481
2009_003494
2009_003498
2009_003504
2009_003507
2009_003517
2009_003523
2009_003542
2009_003549
2009_003551
2009_003564
2009_003569
2009_003576
2009_003589
2009_003607
2009_003640
2009_003666
2009_003696
2009_003703
2009_003707
2009_003756
2009_003771
2009_003773
2009_003804
2009_003806
2009_003810
2009_003849
2009_003857
2009_003858
2009_003895
2009_003903
2009_003904
2009_003928
2009_003938
2009_003971
2009_003991
2009_004021
2009_004033
2009_004043
2009_004070
2009_004072
2009_004084
2009_004099
2009_004125
2009_004140
2009_004217
2009_004221
2009_004247
2009_004248
2009_004255
2009_004298
2009_004324
2009_004455
2009_004494
2009_004497
2009_004504
2009_004507
2009_004509
2009_004540
2009_004568
2009_004579
2009_004581
2009_004590
2009_004592
2009_004594
2009_004635
2009_004653
2009_004687
2009_004721
2009_004730
2009_004732
2009_004738
2009_004748
2009_004789
2009_004799
2009_004801
2009_004848
2009_004859
2009_004867
2009_004882
2009_004886
2009_004895
2009_004942
2009_004969
2009_004987
2009_004993
2009_004994
2009_005038
2009_005078
2009_005087
2009_005089
2009_005137
2009_005148
2009_005156
2009_005158
2009_005189
2009_005190
2009_005217
2009_005219
2009_005220
2009_005231
2009_005260
2009_005262
2009_005302
2010_000003
2010_000038
2010_000065
2010_000083
2010_000084
2010_000087
2010_000110
2010_000159
2010_000160
2010_000163
2010_000174
2010_000216
2010_000238
2010_000241
2010_000256
2010_000272
2010_000284
2010_000309
2010_000318
2010_000330
2010_000335
2010_000342
2010_000372
2010_000422
2010_000426
2010_000427
2010_000502
2010_000530
2010_000552
2010_000559
2010_000572
2010_000573
2010_000622
2010_000628
2010_000639
2010_000666
2010_000679
2010_000682
2010_000683
2010_000724
2010_000738
2010_000764
2010_000788
2010_000814
2010_000836
2010_000874
2010_000904
2010_000906
2010_000907
2010_000918
2010_000929
2010_000941
2010_000952
2010_000961
2010_001000
2010_001010
2010_001011
2010_001016
2010_001017
2010_001024
2010_001036
2010_001061
2010_001069
2010_001070
2010_001079
2010_001104
2010_001124
2010_001149
2010_001151
2010_001174
2010_001206
2010_001246
2010_001251
2010_001256
2010_001264
2010_001292
2010_001313
2010_001327
2010_001331
2010_001351
2010_001367
2010_001376
2010_001403
2010_001448
2010_001451
2010_001522
2010_001534
2010_001553
2010_001557
2010_001563
2010_001577
2010_001579
2010_001646
2010_001656
2010_001692
2010_001699
2010_001734
2010_001752
2010_001767
2010_001768
2010_001773
2010_001820
2010_001830
2010_001851
2010_001908
2010_001913
2010_001951
2010_001956
2010_001962
2010_001966
2010_001995
2010_002017
2010_002025
2010_002030
2010_002106
2010_002137
2010_002142
2010_002146
2010_002147
2010_002150
2010_002161
2010_002200
2010_002228
2010_002232
2010_002251
2010_002271
2010_002305
2010_002310
2010_002336
2010_002348
2010_002361
2010_002390
2010_002396
2010_002422
2010_002450
2010_002480
2010_002512
2010_002531
2010_002536
2010_002538
2010_002546
2010_002623
2010_002682
2010_002691
2010_002693
2010_002701
2010_002763
2010_002792
2010_002868
2010_002900
2010_002902
2010_002921
2010_002929
2010_002939
2010_002988
2010_003014
2010_003060
2010_003123
2010_003127
2010_003132
2010_003168
2010_003183
2010_003187
2010_003207
2010_003231
2010_003239
2010_003275
2010_003276
2010_003293
2010_003302
2010_003325
2010_003362
2010_003365
2010_003381
2010_003402
2010_003409
2010_003418
2010_003446
2010_003453
2010_003468
2010_003473
2010_003495
2010_003506
2010_003514
2010_003531
2010_003532
2010_003541
2010_003547
2010_003597
2010_003675
2010_003708
2010_003716
2010_003746
2010_003758
2010_003764
2010_003768
2010_003771
2010_003772
2010_003781
2010_003813
2010_003820
2010_003854
2010_003912
2010_003915
2010_003947
2010_003956
2010_003971
2010_004041
2010_004042
2010_004056
2010_004063
2010_004104
2010_004120
2010_004149
2010_004165
2010_004208
2010_004219
2010_004226
2010_004314
2010_004320
2010_004322
2010_004337
2010_004348
2010_004355
2010_004369
2010_004382
2010_004419
2010_004432
2010_004472
2010_004479
2010_004519
2010_004520
2010_004529
2010_004543
2010_004550
2010_004551
2010_004556
2010_004559
2010_004628
2010_004635
2010_004662
2010_004697
2010_004757
2010_004763
2010_004772
2010_004783
2010_004789
2010_004795
2010_004815
2010_004825
2010_004828
2010_004856
2010_004857
2010_004861
2010_004941
2010_004946
2010_004951
2010_004980
2010_004994
2010_005013
2010_005021
2010_005046
2010_005063
2010_005108
2010_005118
2010_005159
2010_005160
2010_005166
2010_005174
2010_005180
2010_005187
2010_005206
2010_005245
2010_005252
2010_005284
2010_005305
2010_005344
2010_005353
2010_005366
2010_005401
2010_005421
2010_005428
2010_005432
2010_005433
2010_005496
2010_005501
2010_005508
2010_005531
2010_005534
2010_005575
2010_005582
2010_005606
2010_005626
2010_005644
2010_005664
2010_005705
2010_005706
2010_005709
2010_005718
2010_005719
2010_005727
2010_005762
2010_005788
2010_005860
2010_005871
2010_005877
2010_005888
2010_005899
2010_005922
2010_005991
2010_005992
2010_006026
2010_006034
2010_006054
2010_006070
2011_000045
2011_000051
2011_000054
2011_000066
2011_000070
2011_000112
2011_000173
2011_000178
2011_000185
2011_000226
2011_000234
2011_000238
2011_000239
2011_000248
2011_000283
2011_000291
2011_000310
2011_000312
2011_000338
2011_000396
2011_000412
2011_000419
2011_000435
2011_000436
2011_000438
2011_000455
2011_000456
2011_000479
2011_000481
2011_000482
2011_000503
2011_000512
2011_000521
2011_000526
2011_000536
2011_000548
2011_000566
2011_000585
2011_000598
2011_000607
2011_000618
2011_000638
2011_000658
2011_000661
2011_000669
2011_000747
2011_000780
2011_000789
2011_000807
2011_000809
2011_000813
2011_000830
2011_000843
2011_000874
2011_000888
2011_000900
2011_000912
2011_000953
2011_000969
2011_001005
2011_001014
2011_001020
2011_001047
2011_001060
2011_001064
2011_001069
2011_001071
2011_001082
2011_001110
2011_001114
2011_001159
2011_001161
2011_001190
2011_001232
2011_001263
2011_001276
2011_001281
2011_001287
2011_001292
2011_001313
2011_001341
2011_001346
2011_001350
2011_001407
2011_001416
2011_001421
2011_001434
2011_001447
2011_001489
2011_001529
2011_001530
2011_001534
2011_001546
2011_001567
2011_001589
2011_001597
2011_001601
2011_001607
2011_001613
2011_001614
2011_001619
2011_001624
2011_001642
2011_001665
2011_001669
2011_001674
2011_001708
2011_001713
2011_001714
2011_001722
2011_001726
2011_001745
2011_001748
2011_001775
2011_001782
2011_001793
2011_001794
2011_001812
2011_001862
2011_001863
2011_001868
2011_001880
2011_001910
2011_001984
2011_001988
2011_002002
2011_002040
2011_002041
2011_002064
2011_002075
2011_002098
2011_002110
2011_002121
2011_002124
2011_002150
2011_002156
2011_002178
2011_002200
2011_002223
2011_002244
2011_002247
2011_002279
2011_002295
2011_002298
2011_002308
2011_002317
2011_002322
2011_002327
2011_002343
2011_002358
2011_002371
2011_002379
2011_002391
2011_002498
2011_002509
2011_002515
2011_002532
2011_002535
2011_002548
2011_002575
2011_002578
2011_002589
2011_002592
2011_002623
2011_002641
2011_002644
2011_002662
2011_002675
2011_002685
2011_002713
2011_002730
2011_002754
2011_002812
2011_002863
2011_002879
2011_002885
2011_002929
2011_002951
2011_002975
2011_002993
2011_002997
2011_003003
2011_003011
2011_003019
2011_003030
2011_003055
2011_003085
2011_003103
2011_003114
2011_003145
2011_003146
2011_003182
2011_003197
2011_003205
2011_003240
2011_003256
2011_003271
...@@ -15,25 +15,69 @@ ...@@ -15,25 +15,69 @@
import mindspore.dataset.transforms.vision.c_transforms as vision import mindspore.dataset.transforms.vision.c_transforms as vision
import mindspore.dataset as ds import mindspore.dataset as ds
from mindspore import log as logger
DATA_DIR = "../data/dataset/testVOC2012" DATA_DIR = "../data/dataset/testVOC2012"
IMAGE_SHAPE = [2268, 2268, 2268, 2268, 642, 607, 561, 596, 612, 2268]
TARGET_SHAPE = [680, 680, 680, 680, 642, 607, 561, 596, 612, 680]
def test_voc_segmentation():
data1 = ds.VOCDataset(DATA_DIR, task="Segmentation", mode="train", decode=True, shuffle=False)
num = 0
for item in data1.create_dict_iterator():
assert (item["image"].shape[0] == IMAGE_SHAPE[num])
assert (item["target"].shape[0] == TARGET_SHAPE[num])
num += 1
assert (num == 10)
def test_voc_normal(): def test_voc_detection():
data1 = ds.VOCDataset(DATA_DIR, decode=True) data1 = ds.VOCDataset(DATA_DIR, task="Detection", mode="train", decode=True, shuffle=False)
num = 0 num = 0
count = [ 0, 0, 0, 0, 0, 0 ]
for item in data1.create_dict_iterator(): for item in data1.create_dict_iterator():
logger.info("item[image] is {}".format(item["image"])) assert (item["image"].shape[0] == IMAGE_SHAPE[num])
logger.info("item[image].shape is {}".format(item["image"].shape)) for bbox in item["annotation"]:
logger.info("item[target] is {}".format(item["target"])) count[bbox[0]] += 1
logger.info("item[target].shape is {}".format(item["target"].shape))
num += 1 num += 1
logger.info("num is {}".format(str(num))) assert (num == 9)
assert (count == [3,2,1,2,4,3])
def test_voc_class_index():
class_index = { 'car': 0, 'cat': 1, 'train': 5 }
data1 = ds.VOCDataset(DATA_DIR, task="Detection", mode="train", class_indexing=class_index, decode=True)
class_index1 = data1.get_class_indexing()
assert (class_index1 == { 'car': 0, 'cat': 1, 'train': 5 })
data1 = data1.shuffle(4)
class_index2 = data1.get_class_indexing()
assert (class_index2 == { 'car': 0, 'cat': 1, 'train': 5 })
num = 0
count = [0,0,0,0,0,0]
for item in data1.create_dict_iterator():
for bbox in item["annotation"]:
assert (bbox[0] == 0 or bbox[0] == 1 or bbox[0] == 5)
count[bbox[0]] += 1
num += 1
assert (num == 6)
assert (count == [3,2,0,0,0,3])
def test_voc_get_class_indexing():
data1 = ds.VOCDataset(DATA_DIR, task="Detection", mode="train", decode=True)
class_index1 = data1.get_class_indexing()
assert (class_index1 == { 'car': 0, 'cat': 1, 'chair': 2, 'dog': 3, 'person': 4, 'train': 5 })
data1 = data1.shuffle(4)
class_index2 = data1.get_class_indexing()
assert (class_index2 == { 'car': 0, 'cat': 1, 'chair': 2, 'dog': 3, 'person': 4, 'train': 5 })
num = 0
count = [0,0,0,0,0,0]
for item in data1.create_dict_iterator():
for bbox in item["annotation"]:
assert (bbox[0] == 0 or bbox[0] == 1 or bbox[0] == 2 or bbox[0] == 3 or bbox[0] == 4 or bbox[0] == 5)
count[bbox[0]] += 1
num += 1
assert (num == 9)
assert (count == [3,2,1,2,4,3])
def test_case_0(): def test_case_0():
data1 = ds.VOCDataset(DATA_DIR, decode=True) data1 = ds.VOCDataset(DATA_DIR, task="Segmentation", mode="train", decode=True)
resize_op = vision.Resize((224, 224)) resize_op = vision.Resize((224, 224))
...@@ -46,7 +90,79 @@ def test_case_0(): ...@@ -46,7 +90,79 @@ def test_case_0():
num = 0 num = 0
for item in data1.create_dict_iterator(): for item in data1.create_dict_iterator():
logger.info("item[image].shape is {}".format(item["image"].shape))
logger.info("item[target].shape is {}".format(item["target"].shape))
num += 1 num += 1
logger.info("num is {}".format(str(num))) assert (num == 20)
def test_case_1():
data1 = ds.VOCDataset(DATA_DIR, task="Detection", mode="train", decode=True)
resize_op = vision.Resize((224, 224))
data1 = data1.map(input_columns=["image"], operations=resize_op)
repeat_num = 4
data1 = data1.repeat(repeat_num)
batch_size = 2
data1 = data1.batch(batch_size, drop_remainder=True, pad_info={})
num = 0
for item in data1.create_dict_iterator():
num += 1
assert (num == 18)
def test_voc_exception():
try:
data1 = ds.VOCDataset(DATA_DIR, task="InvalidTask", mode="train", decode=True)
for _ in data1.create_dict_iterator():
pass
assert False
except ValueError:
pass
try:
data2 = ds.VOCDataset(DATA_DIR, task="Segmentation", mode="train", class_indexing={ "cat":0 }, decode=True)
for _ in data2.create_dict_iterator():
pass
assert False
except ValueError:
pass
try:
data3 = ds.VOCDataset(DATA_DIR, task="Detection", mode="notexist", decode=True)
for _ in data3.create_dict_iterator():
pass
assert False
except ValueError:
pass
try:
data4 = ds.VOCDataset(DATA_DIR, task="Detection", mode="xmlnotexist", decode=True)
for _ in data4.create_dict_iterator():
pass
assert False
except RuntimeError:
pass
try:
data5 = ds.VOCDataset(DATA_DIR, task="Detection", mode="invalidxml", decode=True)
for _ in data5.create_dict_iterator():
pass
assert False
except RuntimeError:
pass
try:
data6 = ds.VOCDataset(DATA_DIR, task="Detection", mode="xmlnoobject", decode=True)
for _ in data6.create_dict_iterator():
pass
assert False
except RuntimeError:
pass
if __name__ == '__main__':
test_voc_segmentation()
test_voc_detection()
test_voc_class_index()
test_voc_get_class_indexing()
test_case_0()
test_case_1()
test_voc_exception()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册