!2314 Implemented RandomHorizontalFlipWithBBox and BoundingBoxAugment C++ Ops
Merge pull request !2314 from imaaamin/object_ops_prpull/2314/MERGE
commit
90bb9320aa
@ -0,0 +1,77 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include "dataset/kernels/image/bounding_box_augment_op.h"
|
||||||
|
#include "dataset/kernels/image/resize_op.h"
|
||||||
|
#include "dataset/kernels/image/image_utils.h"
|
||||||
|
#include "dataset/core/cv_tensor.h"
|
||||||
|
|
||||||
|
namespace mindspore {
|
||||||
|
namespace dataset {
|
||||||
|
const float BoundingBoxAugOp::defRatio = 0.3;
|
||||||
|
|
||||||
|
BoundingBoxAugOp::BoundingBoxAugOp(std::shared_ptr<TensorOp> transform, float ratio)
|
||||||
|
: ratio_(ratio), transform_(std::move(transform)) {}
|
||||||
|
|
||||||
|
Status BoundingBoxAugOp::Compute(const TensorRow &input, TensorRow *output) {
|
||||||
|
IO_CHECK_VECTOR(input, output);
|
||||||
|
BOUNDING_BOX_CHECK(input); // check if bounding boxes are valid
|
||||||
|
uint32_t num_of_boxes = input[1]->shape()[0];
|
||||||
|
uint32_t num_to_aug = num_of_boxes * ratio_; // cast to int
|
||||||
|
std::vector<uint32_t> boxes(num_of_boxes);
|
||||||
|
std::vector<uint32_t> selected_boxes;
|
||||||
|
for (uint32_t i = 0; i < num_of_boxes; i++) boxes[i] = i;
|
||||||
|
// sample bboxes according to ratio picked by user
|
||||||
|
std::random_device rd;
|
||||||
|
std::sample(boxes.begin(), boxes.end(), std::back_inserter(selected_boxes), num_to_aug, std::mt19937(rd()));
|
||||||
|
std::shared_ptr<Tensor> crop_out;
|
||||||
|
std::shared_ptr<Tensor> res_out;
|
||||||
|
std::shared_ptr<CVTensor> input_restore = CVTensor::AsCVTensor(input[0]);
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < num_to_aug; i++) {
|
||||||
|
uint32_t min_x = 0;
|
||||||
|
uint32_t min_y = 0;
|
||||||
|
uint32_t b_w = 0;
|
||||||
|
uint32_t b_h = 0;
|
||||||
|
// get the required items
|
||||||
|
input[1]->GetItemAt<uint32_t>(&min_x, {selected_boxes[i], 0});
|
||||||
|
input[1]->GetItemAt<uint32_t>(&min_y, {selected_boxes[i], 1});
|
||||||
|
input[1]->GetItemAt<uint32_t>(&b_w, {selected_boxes[i], 2});
|
||||||
|
input[1]->GetItemAt<uint32_t>(&b_h, {selected_boxes[i], 3});
|
||||||
|
Crop(input_restore, &crop_out, min_x, min_y, b_w, b_h);
|
||||||
|
// transform the cropped bbox region
|
||||||
|
transform_->Compute(crop_out, &res_out);
|
||||||
|
// place the transformed region back in the restored input
|
||||||
|
std::shared_ptr<CVTensor> res_img = CVTensor::AsCVTensor(res_out);
|
||||||
|
// check if transformed crop is out of bounds of the box
|
||||||
|
if (res_img->mat().cols > b_w || res_img->mat().rows > b_h || res_img->mat().cols < b_w ||
|
||||||
|
res_img->mat().rows < b_h) {
|
||||||
|
// if so, resize to fit in the box
|
||||||
|
std::shared_ptr<TensorOp> resize_op = std::make_shared<ResizeOp>(b_h, b_w);
|
||||||
|
resize_op->Compute(std::static_pointer_cast<Tensor>(res_img), &res_out);
|
||||||
|
res_img = CVTensor::AsCVTensor(res_out);
|
||||||
|
}
|
||||||
|
res_img->mat().copyTo(input_restore->mat()(cv::Rect(min_x, min_y, res_img->mat().cols, res_img->mat().rows)));
|
||||||
|
}
|
||||||
|
(*output).push_back(std::move(std::static_pointer_cast<Tensor>(input_restore)));
|
||||||
|
(*output).push_back(input[1]);
|
||||||
|
return Status::OK();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace dataset
|
||||||
|
} // namespace mindspore
|
@ -0,0 +1,59 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef DATASET_KERNELS_IMAGE_BOUNDING_BOX_AUGMENT_OP_H_
|
||||||
|
#define DATASET_KERNELS_IMAGE_BOUNDING_BOX_AUGMENT_OP_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
#include <random>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <opencv2/imgproc/imgproc.hpp>
|
||||||
|
#include "dataset/core/tensor.h"
|
||||||
|
#include "dataset/kernels/tensor_op.h"
|
||||||
|
#include "dataset/util/status.h"
|
||||||
|
|
||||||
|
namespace mindspore {
|
||||||
|
namespace dataset {
|
||||||
|
class BoundingBoxAugOp : public TensorOp {
|
||||||
|
public:
|
||||||
|
// Default values, also used by python_bindings.cc
|
||||||
|
static const float defRatio;
|
||||||
|
|
||||||
|
// Constructor for BoundingBoxAugmentOp
|
||||||
|
// @param std::shared_ptr<TensorOp> transform transform: C++ opration to apply on select bounding boxes
|
||||||
|
// @param float ratio: ratio of bounding boxes to have the transform applied on
|
||||||
|
BoundingBoxAugOp(std::shared_ptr<TensorOp> transform, float ratio);
|
||||||
|
|
||||||
|
~BoundingBoxAugOp() override = default;
|
||||||
|
|
||||||
|
// Provide stream operator for displaying it
|
||||||
|
friend std::ostream &operator<<(std::ostream &out, const BoundingBoxAugOp &so) {
|
||||||
|
so.Print(out);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Print(std::ostream &out) const override { out << "BoundingBoxAugOp"; }
|
||||||
|
|
||||||
|
Status Compute(const TensorRow &input, TensorRow *output) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float ratio_;
|
||||||
|
std::shared_ptr<TensorOp> transform_;
|
||||||
|
};
|
||||||
|
} // namespace dataset
|
||||||
|
} // namespace mindspore
|
||||||
|
|
||||||
|
#endif // DATASET_KERNELS_IMAGE_BOUNDING_BOX_AUGMENT_OP_H_
|
@ -0,0 +1,61 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#include <utility>
|
||||||
|
#include "dataset/kernels/image/random_horizontal_flip_bbox_op.h"
|
||||||
|
#include "dataset/kernels/image/image_utils.h"
|
||||||
|
#include "dataset/util/status.h"
|
||||||
|
#include "dataset/core/cv_tensor.h"
|
||||||
|
#include "dataset/core/pybind_support.h"
|
||||||
|
|
||||||
|
namespace mindspore {
|
||||||
|
namespace dataset {
|
||||||
|
const float RandomHorizontalFlipWithBBoxOp::kDefProbability = 0.5;
|
||||||
|
|
||||||
|
Status RandomHorizontalFlipWithBBoxOp::Compute(const TensorRow &input, TensorRow *output) {
|
||||||
|
IO_CHECK_VECTOR(input, output);
|
||||||
|
BOUNDING_BOX_CHECK(input);
|
||||||
|
if (distribution_(rnd_)) {
|
||||||
|
// To test bounding boxes algorithm, create random bboxes from image dims
|
||||||
|
size_t numOfBBoxes = input[1]->shape()[0]; // set to give number of bboxes
|
||||||
|
float imgCenter = (input[0]->shape()[1] / 2); // get the center of the image
|
||||||
|
|
||||||
|
for (int i = 0; i < numOfBBoxes; i++) {
|
||||||
|
uint32_t b_w = 0; // bounding box width
|
||||||
|
uint32_t min_x = 0;
|
||||||
|
// get the required items
|
||||||
|
input[1]->GetItemAt<uint32_t>(&min_x, {i, 0});
|
||||||
|
input[1]->GetItemAt<uint32_t>(&b_w, {i, 2});
|
||||||
|
// do the flip
|
||||||
|
float diff = imgCenter - min_x; // get distance from min_x to center
|
||||||
|
uint32_t refl_min_x = diff + imgCenter; // get reflection of min_x
|
||||||
|
uint32_t new_min_x = refl_min_x - b_w; // subtract from the reflected min_x to get the new one
|
||||||
|
|
||||||
|
input[1]->SetItemAt<uint32_t>({i, 0}, new_min_x);
|
||||||
|
}
|
||||||
|
(*output).push_back(nullptr);
|
||||||
|
(*output).push_back(nullptr);
|
||||||
|
// move input to output pointer of bounding boxes
|
||||||
|
(*output)[1] = std::move(input[1]);
|
||||||
|
// perform HorizontalFlip on the image
|
||||||
|
std::shared_ptr<CVTensor> input_cv = CVTensor::AsCVTensor(std::move(input[0]));
|
||||||
|
return HorizontalFlip(std::static_pointer_cast<Tensor>(input_cv), &(*output)[0]);
|
||||||
|
}
|
||||||
|
*output = input;
|
||||||
|
return Status::OK();
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace dataset
|
||||||
|
} // namespace mindspore
|
@ -0,0 +1,62 @@
|
|||||||
|
/**
|
||||||
|
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#ifndef DATASET_KERNELS_IMAGE_RANDOM_HORIZONTAL_FLIP_BBOX_OP_H_
|
||||||
|
#define DATASET_KERNELS_IMAGE_RANDOM_HORIZONTAL_FLIP_BBOX_OP_H_
|
||||||
|
|
||||||
|
#include <pybind11/numpy.h>
|
||||||
|
#include <pybind11/stl.h>
|
||||||
|
#include <memory>
|
||||||
|
#include <random>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <opencv2/imgproc/imgproc.hpp>
|
||||||
|
#include "dataset/core/tensor.h"
|
||||||
|
#include "dataset/kernels/tensor_op.h"
|
||||||
|
#include "dataset/util/random.h"
|
||||||
|
#include "dataset/util/status.h"
|
||||||
|
#include "pybind11/pybind11.h"
|
||||||
|
#include "pybind11/stl_bind.h"
|
||||||
|
|
||||||
|
namespace mindspore {
|
||||||
|
namespace dataset {
|
||||||
|
class RandomHorizontalFlipWithBBoxOp : public TensorOp {
|
||||||
|
public:
|
||||||
|
// Default values, also used by python_bindings.cc
|
||||||
|
static const float kDefProbability;
|
||||||
|
|
||||||
|
explicit RandomHorizontalFlipWithBBoxOp(float probability = kDefProbability) : distribution_(probability) {
|
||||||
|
rnd_.seed(GetSeed());
|
||||||
|
}
|
||||||
|
|
||||||
|
~RandomHorizontalFlipWithBBoxOp() override = default;
|
||||||
|
|
||||||
|
// Provide stream operator for displaying it
|
||||||
|
friend std::ostream &operator<<(std::ostream &out, const RandomHorizontalFlipWithBBoxOp &so) {
|
||||||
|
so.Print(out);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Print(std::ostream &out) const override { out << "RandomHorizontalFlipWithBBoxOp"; }
|
||||||
|
|
||||||
|
Status Compute(const TensorRow &input, TensorRow *output) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::mt19937 rnd_;
|
||||||
|
std::bernoulli_distribution distribution_;
|
||||||
|
};
|
||||||
|
} // namespace dataset
|
||||||
|
} // namespace mindspore
|
||||||
|
|
||||||
|
#endif // DATASET_KERNELS_IMAGE_RANDOM_HORIZONTAL_FLIP_BBOX_OP_H_
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>121.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>dog</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>55</xmin>
|
||||||
|
<ymin>34</ymin>
|
||||||
|
<xmax>624</xmax>
|
||||||
|
<ymax>555</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>123.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>car</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>1</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>42</xmin>
|
||||||
|
<ymin>6</ymin>
|
||||||
|
<xmax>610</xmax>
|
||||||
|
<ymax>600</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>129.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>dog</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>1328</xmin>
|
||||||
|
<ymin>431</ymin>
|
||||||
|
<xmax>2662</xmax>
|
||||||
|
<ymax>1695</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>32.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>281</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>train</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>1168</xmin>
|
||||||
|
<ymin>405</ymin>
|
||||||
|
<xmax>3270</xmax>
|
||||||
|
<ymax>2022</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>32.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>281</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>train</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>1168</xmin>
|
||||||
|
<ymin>405</ymin>
|
||||||
|
<xmax>3270</xmax>
|
||||||
|
<ymax>2022</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<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>
|
||||||
|
<object>
|
||||||
|
<name>person</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>1168</xmin>
|
||||||
|
<ymin>395</ymin>
|
||||||
|
<xmax>2859</xmax>
|
||||||
|
<ymax>2084</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>39.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>dog</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>684</xmin>
|
||||||
|
<ymin>311</ymin>
|
||||||
|
<xmax>3112</xmax>
|
||||||
|
<ymax>1820</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>42.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>335</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>person</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>1</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>874</xmin>
|
||||||
|
<ymin>152</ymin>
|
||||||
|
<xmax>2827</xmax>
|
||||||
|
<ymax>2000</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,39 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>61.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>333</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>train</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>25</xmin>
|
||||||
|
<ymin>40</ymin>
|
||||||
|
<xmax>641</xmax>
|
||||||
|
<ymax>613</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
<object>
|
||||||
|
<name>person</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>204</xmin>
|
||||||
|
<ymin>198</ymin>
|
||||||
|
<xmax>271</xmax>
|
||||||
|
<ymax>293</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,39 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>63.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>cat</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>0</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>23</xmin>
|
||||||
|
<ymin>17</ymin>
|
||||||
|
<xmax>565</xmax>
|
||||||
|
<ymax>591</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
<object>
|
||||||
|
<name>chair</name>
|
||||||
|
<pose>Frontal</pose>
|
||||||
|
<truncated>1</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>36</xmin>
|
||||||
|
<ymin>11</ymin>
|
||||||
|
<xmax>439</xmax>
|
||||||
|
<ymax>499</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1,27 @@
|
|||||||
|
<annotation>
|
||||||
|
<folder>VOC2012</folder>
|
||||||
|
<filename>68.jpg</filename>
|
||||||
|
<source>
|
||||||
|
<database>simulate VOC2007 Database</database>
|
||||||
|
<annotation>simulate VOC2007</annotation>
|
||||||
|
<image>flickr</image>
|
||||||
|
</source>
|
||||||
|
<size>
|
||||||
|
<width>500</width>
|
||||||
|
<height>375</height>
|
||||||
|
<depth>3</depth>
|
||||||
|
</size>
|
||||||
|
<segmented>1</segmented>
|
||||||
|
<object>
|
||||||
|
<name>cat</name>
|
||||||
|
<pose>Unspecified</pose>
|
||||||
|
<truncated>1</truncated>
|
||||||
|
<difficult>0</difficult>
|
||||||
|
<bndbox>
|
||||||
|
<xmin>35</xmin>
|
||||||
|
<ymin>11</ymin>
|
||||||
|
<xmax>564</xmax>
|
||||||
|
<ymax>545</ymax>
|
||||||
|
</bndbox>
|
||||||
|
</object>
|
||||||
|
</annotation>
|
@ -0,0 +1 @@
|
|||||||
|
invalidxml
|
@ -0,0 +1,15 @@
|
|||||||
|
<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>
|
@ -0,0 +1 @@
|
|||||||
|
invalidxml
|
@ -0,0 +1,11 @@
|
|||||||
|
15
|
||||||
|
32
|
||||||
|
33
|
||||||
|
39
|
||||||
|
42
|
||||||
|
61
|
||||||
|
63
|
||||||
|
68
|
||||||
|
121
|
||||||
|
123
|
||||||
|
129
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue