AIAS/7_engine_hub/training
2023-09-20 15:25:13 +08:00
..
platform-train no message 2023-09-20 15:25:13 +08:00
platform-train-ui update english comments 2023-03-21 20:46:31 +08:00
README_cn.md initial version - writing english doc. 2023-03-20 17:07:14 +08:00
README.md update readme to support bilingual. 2023-03-21 12:08:09 +08:00

Download the model and place it in the models directory

AI Training Platform

The AI training platform provides classification model training capabilities and provides interfaces to upper-layer applications in the form of REST APIs. The current version includes the following functions:

  • Classification model training (resnet50 model pre-trained with Imagenet dataset)
  • Model training visualization
  • Image classification inference
  • Image feature extraction (512-dimensional feature)
  • Image 1:1 comparison

Front-end deployment

nginx deployment operation:

cd /usr/local/etc/nginx/
vi /usr/local/etc/nginx/nginx.conf
#Edit nginx.conf

server {
listen       8080;
server_name  localhost;

location / {
root   /Users/calvin/platform/dist/;
index  index.html index.htm;
        }
......

#Reload configuration:
sudo nginx -s reload

#After deploying the application, restart:
cd /usr/local/Cellar/nginx/1.19.6/bin

#Fast stop
sudo nginx -s stop

#Start
sudo nginx

Configure the hosts file:

#Add the mapping <127.0.0.1 train.aias.me> to the hosts file of the client (browser) machine,
#where 127.0.0.1 is replaced with the IP address of the server where the JAR package is running.

127.0.0.1  train.aias.me

Back-end deployment

# Compile & run the program
java -jar aais-platform-train-0.1.0.jar

Open the browser

Enter the address: http://localhost:8080

1. 训练数据准备-ZIP格式压缩包:

1. Training data preparation-ZIP format compression package:

The compressed package must contain 2 directories (named strictly the same): -TRAIN: Contains training data, and each folder corresponds to a classification (try to keep the number of images in each classification as balanced as possible) -VALIDATION: Contains validation data, and each folder corresponds to a classification

Screenshot

-Download 320 vehicle image test data

2. Upload data and start training:

  • Select the zip file and upload it
  • Click the train button to start training Screenshot

3. View the training process:

Screenshot

4. Image classification test:

Screenshot

5. Feature extraction test:

The image feature extraction uses the newly trained model. The features come from the feature extraction layer of the model. Screenshot

6. Image comparison test:

Screenshot

7. API documentation:

http://127.0.0.1:8089/swagger-ui.html Screenshot

Edit the application.yml in the JAR package

Edit the image upload path and model save path in the application.yml as needed (Windows environment can use 7-zip to edit directly, no need to decompress and recompress the JAR package)

#File storage path
file:
  mac:
    path: ~/file/
    imageRootPath: ~/file/image_root/ #Folder for decompressing compressed files
    newModelPath: ~/file/model/ #Folder for storing models after training
  linux:
    path: /home/aias/file/
    imageRootPath: /home/aias/file/image_root/ #Folder for decompressing compressed files
    newModelPath: /home/aias/file//model/ #Folder for storing models after training
  windows:
    path: C:\\aias\\file\\
    imageRootPath: C:\\aias\\file\\image_root\\ #Folder for decompressing compressed files
    newModelPath: C:\\aias\\file\\modelv2\\ #Folder for storing models after training
  #File size / M
  maxSize: 3000