-
Notifications
You must be signed in to change notification settings - Fork 1
Deep Features
Alexandre Yuji Kajihara edited this page Jan 25, 2024
·
2 revisions
- The extract features using CNN require the installation of CUDA.
- The NVIDIA offered this guide;
- Remember the install CUDNN.
The images must have equal width and height.
- Clone this repository;
$ git clone https://github.com/xaaaandao/piperaceae-features
- Access the repository in the terminal;
$ git clone https://github.com/xaaaandao/piperaceae-features
- Next, it shows an example of how to run a code.
$ python main.py --input
- The list below contains the arguments available.
Usage: main.py [OPTIONS]
Options:
--color [RGB|grayscale] Color of image input.
--contrast FLOAT Value that to use in adjusting the contrast.
-f, --folds INTEGER Number of classes in the dataset.
--gpu INTEGER ID of GPU.
-h, --height INTEGER Height of image input. [required]
-i, --input PATH Path to images. [required]
-m, --model [vgg16|resnet50v2|mobilenetv2]
A model to extract the features. [required]
--orientation [horizontal|vertical|horizontal+vertical]
An orientation of patches must made in an
image. [required]
-o, --output PATH Path to store the NPZ, NPY, and CSV files.
[required]
-p, --patches INTEGER A number the patches must made in an image.
-w, --width INTEGER Width of image input. [required]
--help Show this message and exit.
- Clone this repository;
$ git clone https://github.com/xaaaandao/piperaceae-features
- Open a project;

- Set the folder that contains the image and other arguments;

- To run, press SHIFT+F10 (or run button).

- This program will create a folder called mobilenetv2, resnet50v2, or vgg16 (depending on user choice).
-
mobilenetv2
- A count of files
npzornpy- Each file contains 1280 columns
-
info.csv,info_levels.csv,info_sample.csv
- A count of files
-
resnet50v2
- A count of files
npzornpy- Each file contains 2048 columns
-
info.csv,info_levels.csv,info_sample.csv
- A count of files
-
vgg16
- a count of files
npzornpy- Each file contains 512 columns
-
info.csv,info_levels.csv,info_sample.csv
- a count of files
-
A count of files
npzandnpydepends on the class count in the dataset.- For example, the o dataset contains 100 classes. Therefore, the code will create 100 files.
-
The difference between
npzandnpyfiles is thatnpzfiles separate features of classes. -
info_levels.csvandinfo_samples.csvare files equal between three folders.- It is created for each folder to facilitate the next step (identification).
- This link contains the mean of each row.
-
info.csv- The difference is the value of each row.
- This link contains the mean of each row.
-