พื้นที่เก็บข้อมูลนี้ทำหน้าที่เป็น Transfer Learning Suite เป้าหมายคือเพื่อให้สามารถถ่ายโอนการเรียนรู้ได้อย่างง่ายดายโดยใช้โมเดลการจัดหมวดหมู่รูปภาพ Keras ในตัว! ข้อเสนอแนะใด ๆ เพื่อปรับปรุงพื้นที่เก็บข้อมูลนี้หรือคุณสมบัติใหม่ใด ๆ ที่คุณต้องการดูยินดีต้อนรับ!
คุณสามารถตรวจสอบ Semantic Segmentation Suite ของฉันได้
Keras รุ่นในตัวทั้งหมดมีจำหน่าย:
แบบอย่าง | ขนาด | ความแม่นยำอันดับ 1 | ความแม่นยำระดับ 5 อันดับแรก | พารามิเตอร์ | ความลึก |
---|---|---|---|---|---|
VGG16 | 528 เมกะไบต์ | 0.715 | 0.901 | 138,357,544 | 23 |
วีจีจี19 | 549 เมกะไบต์ | 0.727 | 0.910 | 143,667,240 | 26 |
เรสเน็ต50 | 99 เมกะไบต์ | 0.759 | 0.929 | 25,636,712 | 168 |
เอ็กซ์เซปชั่น | 88 เมกะไบต์ | 0.790 | 0.945 | 22,910,480 | 126 |
InceptionV3 | 92 เมกะไบต์ | 0.788 | 0.944 | 23,851,784 | 159 |
InceptionResNetV2 | 215 เมกะไบต์ | 0.804 | 0.953 | 55,873,736 | 572 |
โมบายเน็ต | 17 เมกะไบต์ | 0.665 | 0.871 | 4,253,864 | 88 |
หนาแน่นNet121 | 33 เมกะไบต์ | 0.745 | 0.918 | 8,062,504 | 121 |
หนาแน่นเน็ต169 | 57 เมกะไบต์ | 0.759 | 0.928 | 14,307,880 | 169 |
DenseNet201 | 80 เมกะไบต์ | 0.770 | 0.933 | 20,242,984 | 201 |
NASNetMobile | 21 เมกะไบต์ | นา | นา | 5,326,716 | นา |
NASNetLarge | 342 เมกะไบต์ | นา | นา | 88,949,818 | นา |
main.py: โหมดการฝึกอบรมและการทำนาย
utils.py: ฟังก์ชั่นยูทิลิตี้ตัวช่วย
จุดตรวจ: ไฟล์จุดตรวจสำหรับแต่ละยุคระหว่างการฝึกอบรม
การคาดการณ์: ผลการคาดการณ์
โครงการนี้มีการอ้างอิงดังต่อไปนี้:
Numpy sudo pip install numpy
OpenCV Python sudo apt-get install python-opencv
TensorFlow sudo pip install --upgrade tensorflow-gpu
Keras sudo pip install keras
สิ่งเดียวที่คุณต้องทำเพื่อเริ่มต้นคือตั้งค่าโฟลเดอร์ในโครงสร้างต่อไปนี้:
├── "dataset_name"
| ├── train
| | ├── class_1_images
| | ├── class_2_images
| | ├── class_X_images
| | ├── .....
| ├── val
| | ├── class_1_images
| | ├── class_2_images
| | ├── class_X_images
| | ├── .....
| ├── test
| | ├── class_1_images
| | ├── class_2_images
| | ├── class_X_images
| | ├── .....
จากนั้นคุณก็สามารถรัน main.py
! ตรวจสอบอาร์กิวเมนต์บรรทัดคำสั่งเพิ่มเติม:
usage: main.py [-h] [--num_epochs NUM_EPOCHS] [--mode MODE] [--image IMAGE]
[--continue_training CONTINUE_TRAINING] [--dataset DATASET]
[--resize_height RESIZE_HEIGHT] [--resize_width RESIZE_WIDTH]
[--batch_size BATCH_SIZE] [--dropout DROPOUT] [--h_flip H_FLIP]
[--v_flip V_FLIP] [--rotation ROTATION] [--zoom ZOOM]
[--shear SHEAR] [--model MODEL]
optional arguments:
-h, --help show this help message and exit
--num_epochs NUM_EPOCHS
Number of epochs to train for
--mode MODE Select "train", or "predict" mode. Note that for
prediction mode you have to specify an image to run
the model on.
--image IMAGE The image you want to predict on. Only valid in
"predict" mode.
--continue_training CONTINUE_TRAINING
Whether to continue training from a checkpoint
--dataset DATASET Dataset you are using.
--resize_height RESIZE_HEIGHT
Height of cropped input image to network
--resize_width RESIZE_WIDTH
Width of cropped input image to network
--batch_size BATCH_SIZE
Number of images in each batch
--dropout DROPOUT Dropout ratio
--h_flip H_FLIP Whether to randomly flip the image horizontally for
data augmentation
--v_flip V_FLIP Whether to randomly flip the image vertically for data
augmentation
--rotation ROTATION Whether to randomly rotate the image for data
augmentation
--zoom ZOOM Whether to randomly zoom in for data augmentation
--shear SHEAR Whether to randomly shear in for data augmentation
--model MODEL Your pre-trained classification model of choice