forked from yangxue0827/R2CNN_FPN_Tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a935107
commit 1822d6d
Showing
234 changed files
with
161,294 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Test results | ||
 | ||
 | ||
 | ||
 | ||
|
||
 | ||
 | ||
 | ||
 |
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
import tensorflow as tf | ||
|
||
###################### | ||
# data set | ||
#################### | ||
|
||
tf.app.flags.DEFINE_string( | ||
'dataset_tfrecord', | ||
'../data/tfrecords', | ||
'tfrecord of fruits dataset' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'new_img_size', | ||
224, | ||
'the value of new height and new width, new_height = new_width' | ||
) | ||
|
||
########################### | ||
# data batch | ||
########################## | ||
tf.app.flags.DEFINE_integer( | ||
'num_classes', | ||
100, | ||
'num of classes' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'batch_size', | ||
32, #64 | ||
'num of imgs in a batch' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'val_batch_size', | ||
16, | ||
'val or test batch' | ||
) | ||
########################### | ||
## learning rate | ||
######################### | ||
tf.app.flags.DEFINE_float( | ||
'lr_begin', | ||
0.0001, # 0.01 # 0.001 for without prepocess | ||
'the value of learning rate start with' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'decay_steps', | ||
2000, # 5000 | ||
"after 'decay_steps' steps, learning rate begin decay" | ||
) | ||
tf.app.flags.DEFINE_float( | ||
'decay_rate', | ||
0.1, | ||
'decay rate' | ||
) | ||
|
||
############################### | ||
# optimizer-- MomentumOptimizer | ||
############################### | ||
tf.app.flags.DEFINE_float( | ||
'momentum', | ||
0.9, | ||
'accumulation = momentum * accumulation + gradient' | ||
) | ||
|
||
############################ | ||
# train | ||
######################## | ||
tf.app.flags.DEFINE_integer( | ||
'max_steps', | ||
30050, | ||
'max iterate steps' | ||
) | ||
|
||
tf.app.flags.DEFINE_string( | ||
'pretrained_model_path', | ||
'../data/pretrained_weights/inception_resnet_v2_2016_08_30.ckpt', | ||
'the path of pretrained weights' | ||
) | ||
tf.app.flags.DEFINE_float( | ||
'weight_decay', | ||
0.00004, | ||
'weight_decay in regulation' | ||
) | ||
################################ | ||
# summary and save_weights_checkpoint | ||
################################## | ||
tf.app.flags.DEFINE_string( | ||
'summary_path', | ||
'../output/inception_res_summary', | ||
'the path of summary write to ' | ||
) | ||
tf.app.flags.DEFINE_string( | ||
'trained_checkpoint', | ||
'../output/inception_res_trainedweights', | ||
'the path to save trained_weights' | ||
) | ||
FLAGS = tf.app.flags.FLAGS |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
import tensorflow as tf | ||
|
||
###################### | ||
# data set | ||
#################### | ||
tf.app.flags.DEFINE_string( | ||
'dataset_tfrecord', | ||
'../data/tfrecords', | ||
'tfrecord of fruits dataset' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'new_img_size', | ||
224, | ||
'the value of new height and new width, new_height = new_width' | ||
) | ||
|
||
########################### | ||
# data batch | ||
########################## | ||
tf.app.flags.DEFINE_integer( | ||
'num_classes', | ||
134, | ||
'num of classes' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'batch_size', | ||
64, #64 | ||
'num of imgs in a batch' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'val_batch_size', | ||
32, | ||
'val or test batch' | ||
) | ||
########################### | ||
## learning rate | ||
######################### | ||
tf.app.flags.DEFINE_float( | ||
'lr_begin', | ||
0.001, # 0.01 # 0.001 for without prepocess | ||
'the value of learning rate start with' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'decay_steps', | ||
20000, # 5000 | ||
"after 'decay_steps' steps, learning rate begin decay" | ||
) | ||
tf.app.flags.DEFINE_float( | ||
'decay_rate', | ||
0.1, | ||
'decay rate' | ||
) | ||
|
||
############################### | ||
# optimizer-- MomentumOptimizer | ||
############################### | ||
tf.app.flags.DEFINE_float( | ||
'momentum', | ||
0.9, | ||
'accumulation = momentum * accumulation + gradient' | ||
) | ||
|
||
############################ | ||
# train | ||
######################## | ||
tf.app.flags.DEFINE_integer( | ||
'max_steps', | ||
4003, | ||
'max iterate steps' | ||
) | ||
|
||
tf.app.flags.DEFINE_string( | ||
'pretrained_model_path', | ||
'../data/pretrained_weights/resnet_v1_101.ckpt', | ||
'the path of pretrained weights' | ||
) | ||
tf.app.flags.DEFINE_float( | ||
'weight_decay', | ||
0.0001, | ||
'weight_decay in regulation' | ||
) | ||
################################ | ||
# summary and save_weights_checkpoint | ||
################################## | ||
tf.app.flags.DEFINE_string( | ||
'summary_path', | ||
'../output/res101_summary', | ||
'the path of summary write to ' | ||
) | ||
tf.app.flags.DEFINE_string( | ||
'trained_checkpoint', | ||
'../output/res101_trained_weights', | ||
'the path to save trained_weights' | ||
) | ||
FLAGS = tf.app.flags.FLAGS |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
import tensorflow as tf | ||
|
||
tf.app.flags.DEFINE_string( | ||
'dataset_tfrecord', | ||
'../data/tfrecords', | ||
'tfrecord of fruits dataset' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'shortside_size', | ||
600, | ||
'the value of new height and new width, new_height = new_width' | ||
) | ||
|
||
########################### | ||
# data batch | ||
########################## | ||
tf.app.flags.DEFINE_integer( | ||
'num_classes', | ||
20, | ||
'num of classes' | ||
) | ||
tf.app.flags.DEFINE_integer( | ||
'batch_size', | ||
1, #64 | ||
'num of imgs in a batch' | ||
) | ||
|
||
############################### | ||
# optimizer-- MomentumOptimizer | ||
############################### | ||
tf.app.flags.DEFINE_float( | ||
'momentum', | ||
0.9, | ||
'accumulation = momentum * accumulation + gradient' | ||
) | ||
|
||
############################ | ||
# train | ||
######################## | ||
tf.app.flags.DEFINE_integer( | ||
'max_steps', | ||
900000, | ||
'max iterate steps' | ||
) | ||
|
||
tf.app.flags.DEFINE_string( | ||
'pretrained_model_path', | ||
'../data/pretrained_weights/resnet_50.ckpt', | ||
'the path of pretrained weights' | ||
) | ||
tf.app.flags.DEFINE_float( | ||
'weight_decay', | ||
0.0001, | ||
'weight_decay in regulation' | ||
) | ||
################################ | ||
# summary and save_weights_checkpoint | ||
################################## | ||
tf.app.flags.DEFINE_string( | ||
'summary_path', | ||
'../output/resnet_summary', | ||
'the path of summary write to ' | ||
) | ||
tf.app.flags.DEFINE_string( | ||
'trained_checkpoint', | ||
'../output/resnet_trained_weights', | ||
'the path to save trained_weights' | ||
) | ||
FLAGS = tf.app.flags.FLAGS |
Binary file not shown.
Oops, something went wrong.