[LEADERG APP] Pix2Pix

Language:

繁體中文

 

 

 

[Introduction]

 

 

Pix2Pix style conversion. Output the original image to the learned image style. For example: convert black and white to color, edge map to photo, map to satellite map and other applications. 

 

 

 

[Instructions]

 

 

1_combine_A_and_B.ipynb

 

There are train, val, and test in the data/A and data/B folders. A is the image after conversion, and B is the image before conversion.

 

Please put the images into the train, val, and test in the A and B folders before and after the conversion. One thing to note is that the train, val, and test in the two folders must be able to find the corresponding image file names.

 

Then click 1. combine A and B to combine the corresponding images into one, and output to data/train, data/val, data/test. 

 

Note:

1). It is recommended that the length and width of the image be the same. If they are not the same, you can zoom or crop them.

 

2). The image file must be .jpg.

 

3). The images need to be matched in pairs. 

 

 

2_visdom_server.ipynb  

Open visdom_server with port 8801. 

 

 

3_visdom_server_browser.ipynb  

Open the browser, you can see the loss curve and other information of the training process. 

 

 

4_train.ipynb

 

Train the model. 

 

•    --continue_train : Load model/latest model to continue training. 

 

•    --n_epochs 1000 : The training epochs is 1000. 

 

•    --gpu_ids 0 : Which gpu to use for training, you can also set more than one, for example --gpu_ids 0,1,2.

 

•    --save_epoch_freq 5 : Store model frequency. 

 

• --epoch_count 2300: The output model file name starts from 2300 times, which means that there have been 2300 epochs of training before. It can be used with continue_train. 

 

 

5_inference_folder.ipynb

 

Inference folder. 

 

•    checkpoints_dir = 'model' : Model folder.

 

•    epoch ='latest': Load the latest_net_G_A model. 

 

•    dataroot ='data/B', phase ='test': The test data folder is data/B/test. 

 

•   num_test = 27: How many test images are in the folder. 

 

 

6_inference_folder_image_pairs.ipynb

 

Inferred folder, the images in the folder are the images of A and B combined by running 1_combine_A_and_B.ipynb.

 

•   checkpoints_dir ='model', epoch ='latest': The model is model/latest_net_G_A.pth.

 

•   dataroot ='data/', phase ='test': The test folder is data/test.

 

•   num_test = 20: How many test images are in the folder. 

 

inference result.png


Recommended Article

1.
LEADERG APP - Starter AI Software (No Code, APP User Interface)

2.
LEADERG AI ZOO - Advanced AI Software (Low Code, Jupyter Lab User Interface)

3.
LEADERG AI Computer ( Deep Learning, PC, workstation, server, NVIDIA GPU, TESLA A100, RTX-3090-24G, Intel VPU, GPU Server

4.
LEADERG AI Education

How to Buy

Welcome to contact us for quotation. We will help you buy right products.
Email: leaderg@leaderg.com

Thanks for our customers

Taiwan University, Tsing Hua University, Yang Ming Chiao Tung University, Cheng Kung University, Taipei Medical University, Taipei University of Nursing and Health Sciences, National Chung Hsing University, Chi Nan University, Ilan University, United University, Defence University, Naval Academy, Feng Chia University, Chang Gung University, I-Shou University, Shih Chien University, Taiwan University of Science and Technology, Taichung University of Science and Technology, Yunlin University of Science and Technology, Chin-Yi University of Science, Formosa University, Pintung University of Science and Technology, Kaohsiung University of Science and Technology, Chaoyang University of Technology, Ming Chi University of Technology, Southern Taiwan University of Science and Technology, Taipei Veterans General Hospital, Chang Gung Medical Foundation, Tzu Chi Medical Foundation, E-Da Hospital, Chung-Shan Institute of Science and Technology, Armaments Bureau, Ministry of Justice Investigation Bureau, Institute of Nuclear Energy Research, Endemic Species Research Institute, Institute of Labor, Occupational Safety And Health, Metal Industries Research & Development Centre, Taiwan Instrument Research Institute, Automotive Research & Testing Center, Taiwan Water Corporation, Taiwan Semiconductor Manufacturing Co., Ltd., United Microelectronics Corp., Nanya Technology, Winbond Electronics Corp., Xintec Inc., Arima Lasers Corporation, AU Optronics Corporation, Innolux Corporation, HannStar Display Corporation, Formosa Plastics Group., Formosa Technologies Corporation, Nan Ya Plastics Corp., Formosa Chemicals & Fibre Corporation, Chinese Petroleum Corporation, Logitech, ELAN Microelectronics Corp., Lextar Electronics Corporation, Darfon Electronics Corp., WPG Holdings, Mirle Automation Corporation, Symtek Automation Asia Co., Ltd, ChipMOS Technologies Inc., Dynapack International Technology Corporation, Primax Electronics Ltd., Grade Upon Technology Corp., AAEON Technology Inc., Stark Technology, Inc., Horng Terng Automation Co., Ltd., Zhen Ding Technology Holding Ltd, Boardtek Electronics Corporation, MiTAC International Corporation, Allion Labs, Inc., Sound Land Corp., Hong Hu Tech, etc.