Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

ImageNet for 8bit quantization

bell__sefi
Beginner
651 Views

The standard Imagenet dataset is divided into many folders where each folder represents the label of the images in that folder.

Normally there is no text file named 'val.txt'.

Do you support this data structure? what should I put in the conf json for this to work?

0 Kudos
1 Solution
Iffa_Intel
Moderator
640 Views

Greetings,


If you are trying to call certain values inside the val.txt, it should be doable as long as you declared/call it properly.

You should declare a string variable and allocate it with your values file & call it.


Example:

val = "C:/Desktop/OpenVino/val.txt"


Or if you are using python, you can use something like subprocess.Popen([r'C:/locations'])

You can refer here for more: https://docs.python.org/3/library/subprocess.html


For further details about quantization you can refer here:

  1. https://docs.openvinotoolkit.org/latest/_docs_Workbench_DG_Int_8_Quantization.html
  2. https://docs.openvinotoolkit.org/latest/_docs_Workbench_DG_Dataset_Types.html#imagenet



Sincerely,

Iffa


View solution in original post

0 Kudos
3 Replies
Iffa_Intel
Moderator
641 Views

Greetings,


If you are trying to call certain values inside the val.txt, it should be doable as long as you declared/call it properly.

You should declare a string variable and allocate it with your values file & call it.


Example:

val = "C:/Desktop/OpenVino/val.txt"


Or if you are using python, you can use something like subprocess.Popen([r'C:/locations'])

You can refer here for more: https://docs.python.org/3/library/subprocess.html


For further details about quantization you can refer here:

  1. https://docs.openvinotoolkit.org/latest/_docs_Workbench_DG_Int_8_Quantization.html
  2. https://docs.openvinotoolkit.org/latest/_docs_Workbench_DG_Dataset_Types.html#imagenet



Sincerely,

Iffa


0 Kudos
bell__sefi
Beginner
622 Views

We didn't understand each-other.

Imagenet is organized in 1000 folders (see attached image \ sketched example). Where each folder contains many images of the same class (the folder name represents the image it self).

However, the 8bit calibration expects to receive a .txt file.

Do you support this type of dataset hierarchy?

If not, how should the .txt file be prepared in this case? 

 

(Image would not upload, this is the structure:

> Imagenet

    > train

    > val

            > n01440764

                     > .........JPEG

                     > .........JPEG

            > n01443537

            > n01494475

0 Kudos
Iffa_Intel
Moderator
609 Views

By default, the imagenet should come together with the val.txt file as you can see in here https://docs.openvinotoolkit.org/latest/workbench_docs_Workbench_DG_Download_and_Cut_Datasets.html


Hence, this is the common structure

|-- imagenet.zip

|-- val.txt

|-- 0001.jpg

|-- 0002.jpg

|...

|-- n.jpg


However, if yours does not have val.txt, you can convert them to unnotated as in here: https://docs.openvinotoolkit.org/latest/workbench_docs_Workbench_DG_Dataset_Types.html


Which forms the archive as below (no val.txt file):

|-- 0001.jpg

|-- 0002.jpg

|...

|-- n.jpg


If your process take too much time, you can also cut the dataset:

https://docs.openvinotoolkit.org/latest/workbench_docs_Workbench_DG_Download_and_Cut_Datasets.html



Sincerely,

Iffa


0 Kudos
Reply