SkillAgentSearch skills...

Tencent Ml Images

Largest multi-label image database; ResNet-101 model; 80.73% top-1 acc on ImageNet

Install / Use

npx skills add Tencent/tencent-ml-images

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Tencent ML-Images

This repository introduces the open-source project dubbed Tencent ML-Images, which publishes

<!--- * **ML-Images**: the largest open-source multi-label image database, including 18,019,881 URLs to images, which are annotated with labels up to 11,166 categories-->
  • ML-Images: the largest open-source multi-label image database, including 17,609,752 training and 88,739 validation image URLs, which are annotated with up to 11,166 categories
  • Resnet-101 model: it is pre-trained on ML-Images, and achieves the top-1 accuracy 80.73% on ImageNet via transfer learning

Updates

  • [2019/12/26] Our manuscript of this open-source project has been accepted to IEEE Access (Journal, ArXiv). It presents more details of the database, the loss function, the training algorithm, and more experimental results.
  • [2018/12/19] We simplify the procedure of downloading images. Please see Download Images.
<!--- * [2018/12/22] We release one ArXiv manuscript at XXX, to demonstrate the details of our database, the loss function and training algorithm, as well as results. --->

Contents

Dependencies

Data

[back to top]

Image Source

[back to top]

The image URLs of ML-Images are collected from ImageNet and Open Images. Specifically,

  • Part 1: From the whole database of ImageNet, we adopt 10,706,941 training and 50,000 validation image URLs, covering 10,032 categories.
  • Part 2: From Open Images, we adopt 6,902,811 training and 38,739 validation image URLs, covering 1,134 unique categories (note that some other categories are merged with their synonymous categories from ImageNet).

Finally, ML-Images includes 17,609,752 training and 88,739 validation image URLs, covering 11,166 categories.

<!--- The image URLs of ML-Images are collected from [ImageNet](http://www.image-net.org/) and [Open Images](https://github.com/openimages/dataset). Specifically, * Part 1: we adopt the set [ImageNet-11k](http://data.mxnet.io/models/imagenet-11k/). It is a subset of ImageNet, collected by [MXNet](http://mxnet.incubator.apache.org/). It includes 1,474,703 images and 11,221 categories. However, we find there are many abstract categories in visual domain, such as "event", "summer", etc. We think that the training images annotated with such abstract categories will not help (even harm) the visual representation learning. Thus, we abandon these categories. * Part 2: We filter the URLs of Open Images via a per-class criteria. Firstly, if one class occurs in less than 650 URLs, then it is removed. Besides, we also 1) remove some abstract categories as did above, and 2) merge some redundant categories with those in ImageNet. Then, if all annotated tags of one URL are removed, then this URL is abandoned. Consequently, 6,902,811 training URLs and 159,424 validation URLs are remained, covering 1,134 unique categories. ---> <!--- We then merge URLs from above two parts according to their categories. Specifically, we firstly all categories to their unique WordIDs defined in [WordNet](https://wordnet.princeton.edu/). According to the semantic topological structure of WordIDs, if two categories share the same WordID or are synonymous, then they are merged to a unique category, as well as their URLs. Finally, the number of remained URLs is 17,659,752, and the number of categories is 11,166. ---> <!--- Consequently, 8,385,050 training URLs and 159,424 validation URLs are remained, covering 2,039 categories. --->

Download Images

[back to top]

Due to the copyright, we cannot provide the original images directly. However, one can obtain all images of our database using the following files:

<!--- ##### Download images from ImageNet --->

Download Images from ImageNet

We find that massive urls provided by ImageNet have expired (please check the file List of all image URLs of Fall 2011 Release at http://image-net.org/download-imageurls). Thus, here we provide the original image IDs of ImageNet used in our database. One can obtain the training/validation images of our database through the following steps:

  • Download the whole database of ImageNet
  • Extract the training/validation images using the image IDs in train_image_id_from_imagenet.txt and val_image_id_from_imagenet.txt

The format of train_image_id_from_imagenet.txt is as follows:

...
n04310904/n04310904_8388.JPEG   2367:1  2172:1  1831:1  1054:1  1041:1  865:1   2:1
n11753700/n11753700_1897.JPEG   5725:1  5619:1  5191:1  5181:1  5173:1  5170:1  1042:1  865:1   2:1
...

As shown above, one image corresponds to one row. The first term is the original image ID of ImageNet. The followed terms separated by space are the annotations. For example, "2367:1" indicates class 2367 and its confidence 1. Note that the class index starts from 0, and you can find the class name from the file data/dictionary_and_semantic_hierarchy.txt.

NOTE: We find that there are some repeated URLs in List of all image URLs of Fall 2011 Release of ImageNet, i.e., the image corresponding to one URL may be stored in multiple sub-folders with different image IDs. We manually check a few repeated images, and find the reason is that one image annotated with a child class may also be annotated with its parent class, then it is saved to two sub-folders with different image IDs. To the best of our knowledge, this point has never been claimed in ImageNet or any other place. If one want to use ImageNet, this point should be noticed. Due to that, there are also a few repeated images in our database, but our training is not significantly influenced. In future, we will update the database by removing the repeated images.

Download Images from Open Images

<!--- * train_urls.txt ([link1](https://drive.google.com/open?id=1ExY0GpRWxGzDHAI-p44m-B0AB76NeLy7), [link2](https://pan.baidu.com/s/1cx6n6CYNqegKVq1O2YVCJg)) * val_urls.txt ([link1](https://drive.google.com/open?id=13SSar872e73UcshIW7IGbmvUGcFjHyxg), [link2](https://pan.baidu.com/s/1BfipStD2PY7MAMRoZa9ecg)) --->

The images from Open Images can be downloaded using URLs. The format of train_urls_from_openimages.txt is as follows:

...
https://c4.staticflickr.com/8/7239/6997334729_e5fb3938b1_o.jpg  3:1  5193:0.9  5851:0.9 9413:1 9416:1
https://c2.staticflickr.com/4/3035/3033882900_a9a4263c55_o.jpg  1053:0.8  1193:0.8  1379:0.8
...

As shown above, one image corresponds to one row. The first term is the image URL. The followed terms separated by space are the annotations. For example, "5193:0.9" indicates class 5193 and its confidence 0.9.

Download Images using URLs

We also provide the code to download images using URLs. As train_urls_from_openimages.txt is very large, here we provide a tiny file train_urls_tiny.txt to demonstrate the downloading procedure.

cd data
./download_urls_multithreading.sh

A sub-folder data/images will be generated to save the downloaded jpeg images, as well as a file train_im_list_tiny.txt to save the image list and the corresponding annotations.

Semantic Hierarchy

[back to top]

We build the semantic hiearchy of 11,166 categories, according to WordNet. The direct parent categories of each class can be found from the file data/dictionary_and_semantic_hierarchy.txt. The whole semantic hierarchy includes 4 independent trees, of which the root nodes are thing, matter, object, physical object and atmospheric phenomenon, respectively. The length of the longest semantic path from root to leaf nodes is 16, and the average length is 7.47.

Annotations

[back to top]

Since the image URLs of ML-Images are collected from ImageNet and Open Images, the annotations of ML-Images are constructed based on the original annotations from ImageNet and Ope

Related Skills

View on GitHub
GitHub Stars3.1k
CategoryData
Updated1d ago
Forks505

Languages

Python

Security Score

85/100

Audited on Aug 7, 2026

No findings