提交 cfd87707 编写于 作者: W wuzewu

Add balloon dataset

上级 a8c87185
IMAGE_PATH
./resources/test/test_img_bird.jpg
input_data:
image:
type : IMAGE
key : IMAGE_PATH
config:
top_only : True
...@@ -37,4 +37,4 @@ from .flowers import FlowersDataset as Flowers ...@@ -37,4 +37,4 @@ from .flowers import FlowersDataset as Flowers
from .stanford_dogs import StanfordDogsDataset as StanfordDogs from .stanford_dogs import StanfordDogsDataset as StanfordDogs
from .food101 import Food101Dataset as Food101 from .food101 import Food101Dataset as Food101
from .indoor67 import Indoor67Dataset as Indoor67 from .indoor67 import Indoor67Dataset as Indoor67
from .coco10 import Coco10 from .balloon import Balloon
...@@ -23,18 +23,19 @@ import paddlehub as hub ...@@ -23,18 +23,19 @@ import paddlehub as hub
from paddlehub.dataset.base_cv_dataset import ObjectDetectionDataset from paddlehub.dataset.base_cv_dataset import ObjectDetectionDataset
class Coco10(ObjectDetectionDataset): class Balloon(ObjectDetectionDataset):
def __init__(self, model_type='ssd'): def __init__(self, model_type='ssd'):
dataset_path = os.path.join(hub.common.dir.DATA_HOME, "coco_10") dataset_path = os.path.join(hub.common.dir.DATA_HOME, "balloon")
# self.base_path = self._download_dataset( self.base_path = self._download_dataset(
# dataset_path=dataset_path, dataset_path=dataset_path,
# url="https://bj.bcebos.com/paddlehub-dataset/dog-cat.tar.gz") url="https://bj.bcebos.com/paddlehub-dataset/balloon.tar.gz")
base_path = dataset_path base_path = dataset_path
train_image_dir = 'val' train_image_dir = 'JPEGImages'
train_list_file = 'annotations/val.json' train_list_file = 'train.json'
validate_image_dir = 'val' validate_image_dir = 'JPEGImages'
validate_list_file = 'annotations/val.json' validate_list_file = 'val.json'
test_image_dir = 'val' test_image_dir = 'JPEGImages'
test_list_file = 'annotations/val.json' test_list_file = 'val.json'
super(Coco10, self).__init__(base_path, train_image_dir, train_list_file, validate_image_dir, validate_list_file, super(Balloon, self).__init__(
test_image_dir, test_list_file, model_type) base_path, train_image_dir, train_list_file, validate_image_dir,
validate_list_file, test_image_dir, test_list_file, model_type)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册