js在自定义对象中添加数据
We are excited to announce integration with the Open Images Dataset and the release of two new public datasets encapsulating subdomains of the Open Images Dataset: Vehicles Object Detection and Shellfish Object Detection.
我们很高兴宣布与开放图像数据集集成,并发布了两个封装了开放图像数据集子域的新公共数据集: 车辆对象检测和贝类对象检测 。
In this post, we will walk through how to make your own custom Open Images dataset.
在本文中,我们将逐步介绍如何制作自己的自定义Open Images数据集。
Vehicles and Shellfish are just a small window into the vast landscape of the Open Images dataset and are meant to provide small examples of datasets that you could construct with Open Images.
Vehicles和Shellfish只是进入Open Images数据集广阔视野的一扇小窗口,旨在提供可使用Open Images构建的数据集的小示例。
关于打开图像 (About Open Images)
Open Images is an open source computer vision detection dataset released by Google under a CC BY 4.0 License. The dataset contains a vast amount of data spanning image classification, object detection, and visual relationship detection across millions of images and bounding box annotations. The Open Image dataset provides a widespread and large scale ground truth for computer vision research.
Open Images是Google根据CC BY 4.0许可发布的开源计算机视觉检测数据集。 该数据集包含大量数据,涵盖了数百万个图像和边框注释中的图像分类,对象检测和视觉关系检测。 开放图像数据集为计算机视觉研究提供了广泛而广泛的地面真理。
为什么要创建自定义打开图像数据集? (Why Create A Custom Open Images Dataset?)
The uses for creating a custom Open Images dataset are many:
创建自定义Open Images数据集的用途很多:
- Experiment with creating a custom object detector 尝试创建自定义对象检测器
Assess feasibility of detecting similar objects before collecting and labeling your own data
在收集和标记自己的数据之前评估检测相似对象的可行性
- Augmenting and existing training set 扩充和现有培训集
- Training a custom detector model checkpoint to apply to a more niche custom task where you have less data 训练自定义检测器模型检查点,以将其应用于数据量较少的更多细分市场自定义任务
- And of course, for fun 😁 当然,为了娱乐fun
Remember this is all free, labeled computer vision data that lives in the creative commons.
请记住,这是生活在创作共用中的所有免费的,带有标签的计算机视觉数据。
打开图像查询工具 (The Open Images Query Tool)
The whole Open Image Dataset is halfway to a terabyte… and to download it raw, you will be running some commands such as:
整个Open Image Dataset大约是TB的一半……并且要原始下载,您将运行一些命令,例如:
aws s3 --no-sign-request sync s3://open-images-dataset/train [target_dir/train] (513GB)
aws s3 --no-sign-request sync s3://open-images-dataset/validation [target_dir/validation] (12GB)
aws s3 --no-sign-request sync s3://open-images-dataset/test [target_dir/test] (36GB)
Luckily, the open source community has created tools that make querying the Open Images database easy to use. In order to construct our custom Open Images datasets, we used the OIDv4_ToolKit. The OIDv4_ToolKit makes it easy for you to query subdomains of the OID and limit to specific classes. Simply with one line of python, you can specify the class and number of images you want. And it comes down with bounding boxes and everything!
幸运的是,开源社区创建了一些工具,使查询Open Images数据库变得易于使用。 为了构建自定义的Open Images数据集 ,我们使用了OIDv4_ToolKit 。 OIDv4_ToolKit使您可以轻松查询OID的子域并将其限制为特定的类。 只需使用一行python,即可指定所需的图像类别和数量。 并附带边界框和所有内容!
Downloading 200 labeled lobsters from Open Images:
从Open Images下载200个带标签的龙虾:
python3 main.py downloader -y --classes Lobster --Dataset Lobster --type_csv train --image_IsGroupOf 0 --n_threads 4 --limit 200
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/3e8f6e22e2f7af6398a978191fd8b057.png)
转换打开的图像注释格式 (Converting Open Images Annotation Formats)
We are excited to announce that we now support Open Images data formats at Roboflow. When you download the Open Images data, you will receive a large intractable CSV file containing all of the annotations in the entire dataset along with a class map. You will also recieve .txt
files for annotations for each image that are much more tractable. We support both of these formats but I recommend using the .txt
files.
我们很高兴地宣布,我们现在在Roboflow支持Open Images数据格式。 下载“打开图像”数据时,您将收到一个庞大的CSV文件,其中包含整个数据集中的所有注释以及一个类映射。 您还将收到.txt
文件,以获取更易于处理的每个图像的注释。 我们支持这两种格式,但我建议使用.txt
文件。
In order to convert your annotations into any format, you simply make a free account with Roboflow and drag your images into the data upload flow.
为了将注释转换为任何格式,您只需使用Roboflow注册一个免费帐户,然后将图像拖到数据上传流程中即可。
![Image for post](https://miro.medium.com/freeze/max/9999/1*9ct-cMh3FU9sIplsqnwo_Q.gif)
Once your dataset is created, you will be able to export in any format you desire. To name a few you will be able to:
创建数据集后,您将能够以所需的任何格式导出。 仅举几例,您将能够:
- Convert Open Images to Coco Json 将打开的图像转换为Coco Json
- Convert Open Images to Pascal Voc XML 将打开的图像转换为Pascal Voc XML
- Convert Open Images to Create ML Json 转换打开的图像以创建ML Json
- Convert Open Images to YOLO Darknet 将打开的图像转换为YOLO Darknet
- Convert Open Images to Amazon Sage Maker 将打开的图像转换为Amazon Sage Maker
- Convert Open Images to Amazon Rekognition 将打开的图像转换为Amazon Rekognition
- Convert Open Images to TFRecord 将打开的图像转换为TFRecord
- Convert Open Images to YOLO Darknet 将打开的图像转换为YOLO Darknet
- Convert Open Images to YOLOv5 Pytorch 将打开的图像转换为YOLOv5 Pytorch
Then you can train your custom detector with whichever model you like! At the time of writing this, I am mostly training YOLOv5 detectors.
然后,您可以使用任何喜欢的模型训练您的自定义检测器! 在撰写本文时,我主要是在训练YOLOv5检测器。
You can also merge your new custom dataset with another one of your datasets to increase coverage.
您还可以将新的自定义数据集与另一个数据集合并以增加覆盖范围。
介绍Roboflow的公共定制开放图像数据集 (Introducing Roboflow’s Public Custom Open Images Datasets)
We have created two public custom Open Images datasets and shared among our public datasets: Vehicles Object Detection and Shellfish Object Detection.
我们创建了两个公共定制的“开放图像”数据集,并在我们的公共数据集中共享:“ 车辆对象检测”和“ 贝类对象检测” 。
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/eccf6a25a4409c917bd9000dfc25eabf.png)
![Image for post](https://miro.medium.com/max/9999/0*O3Izvoyp811Ot1YJ.png)
![Image for post](https://miro.medium.com/max/9999/0*68xqazEuhBvKauWt.png)
![Image for post](https://i-blog.csdnimg.cn/blog_migrate/cf3f74da68ff3bd544a1e2f8a5381686.png)
They have been shared for public use on our public computer vision datasets.
它们已在我们的公共计算机视觉数据集上共享供公众使用。
结论 (Conclusion)
Now you know how to construct a custom Open Images dataset using completely free computer vision data and open source tools.
现在,您知道了如何使用完全免费的计算机视觉数据和开源工具来构建自定义的Open Images数据集。
We look forward to seeing what you build with Open Images! 🚀
我们期待看到您使用Open Images构建的东西! 🚀
If you are interested in scaling up these datasets or working on creating your own, please drop us a line!
如果您有兴趣扩展这些数据集或创建自己的数据集,请给我们下一行 !
翻译自: https://towardsdatascience.com/build-a-custom-open-images-dataset-for-object-detection-9eab73b6a410
js在自定义对象中添加数据