Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
123 Views

ImageNet for 8bit quantization

Jump to solution

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

Accepted Solutions
Highlighted
Moderator
112 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
Highlighted
Moderator
113 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
Highlighted
Beginner
94 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
Highlighted
Moderator
81 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