Skip to content

Instantly share code, notes, and snippets.

@dgtlmoon
Last active June 29, 2020 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgtlmoon/b6f772c181d8d232b4910f4c19765750 to your computer and use it in GitHub Desktop.
Save dgtlmoon/b6f772c181d8d232b4910f4c19765750 to your computer and use it in GitHub Desktop.
#!/bin/bash
curl -X PUT "http://localhost:8080/services/artwork_detect_vgg16" -d '{
"mllib": "caffe",
"description": "detector vgg16",
"type": "supervised",
"parameters": {
"input": {
"connector": "image",
"db": true,
"bbox": true,
"db_width":512,
"db_height":512
},
"mllib": {
"template": "vgg_16",
"finetuning": true,
"weights": "/tags_dataset/models/vgg16/VGG_ILSVRC_16_layers.caffemodel",
"nclasses": 3,
"rotate": true,
"mirror": true,
"db": true,
"noise": {
"all_effects": true,
"prob": 0.001
},
"distort": {
"all_effects": true,
"prob": 0.5
},
"geometry": {
"persp_horizontal": true,
"persp_vertical": true,
"pad_mode": "MIRRORED",
"persp_factor": 0.25,
"zoom_factor": 0.25,
"prob": 0.0
},
"gpu": true
},
"output":{ "confidence_threshold":0.3, "bbox": true }
},
"model": {
"templates": "../templates/caffe/",
"repository": "/tags_dataset/models/vgg16",
"create_repository": true
}
}'
sleep 2
curl -X POST "http://localhost:8080/train" -d '{
"service": "artwork_detect_vgg16",
"async": true,
"parameters": {
"input": {
"shuffle": true,
"db": true,
"db_width": 512,
"db_height": 512
},
"mllib": {
"gpu": true,
"resume": false,
"net": {
"batch_size": 32,
"test_batch_size": 1
},
"solver": {
"iterations": 80000,
"test_interval": 1000,
"snapshot": 1000,
"base_lr": 0.001,
"solver_type": "ADAMSW",
"iter_size": 1
},
"bbox": true
},
"output": {
"measure": [
"map"
]
}
},
"data": [
"/tags_dataset/train.txt",
"/tags_dataset/test.txt"
]
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment