Comments (6)
You should finetune from the pretrained model.
from yolo_tensorflow.
how to finetune ?
this codes doesn't have a finetue? just for test??
if then, please make a comment on tutorial..
from yolo_tensorflow.
Please refer to train.py
, it gives you an example about how to finetune a model from pretrained weight.
from yolo_tensorflow.
You mean like code below?
135 def main():
136 parser = argparse.ArgumentParser()
137 parser.add_argument('--weights', default="YOLO_small.ckpt", type=str)
138 parser.add_argument('--data_dir', default="data", type=str)
139 parser.add_argument('--threshold', default=0.2, type=float)
140 parser.add_argument('--iou_threshold', default=0.5, type=float)
141 parser.add_argument('--gpu', default='', type=str)
The thing is,
Why i try with only pretrained model??
I want to change or add more "slim.conv2d" on below codes,
(ex. net = slim.conv2d(net, 256, 1, scope='conv_11_2'))
To do this, i need to train from "WEIGHTS_FILE = None" unless it gives me error (bcz pretrained model is not same to mode which i changed)
55 net = tf.pad(images, np.array([[0, 0], [3, 3], [3, 3], [0, 0]]), name='pad_1')
56 net = slim.conv2d(net, 64, 7, 2, padding='VALID', scope='conv_2')
57 net = slim.max_pool2d(net, 2, padding='SAME', scope='pool_3')
58 net = slim.conv2d(net, 192, 3, scope='conv_4')
59 net = slim.max_pool2d(net, 2, padding='SAME', scope='pool_5')
60 net = slim.conv2d(net, 128, 1, scope='conv_6')
61 net = slim.conv2d(net, 256, 3, scope='conv_7')
62 net = slim.conv2d(net, 256, 1, scope='conv_8')
63 net = slim.conv2d(net, 512, 3, scope='conv_9')
64 net = slim.max_pool2d(net, 2, padding='SAME', scope='pool_10')
65 net = slim.conv2d(net, 256, 1, scope='conv_11')
66 net = slim.conv2d(net, 512, 3, scope='conv_12')
67 net = slim.conv2d(net, 256, 1, scope='conv_13')
68 net = slim.conv2d(net, 512, 3, scope='conv_14')
69 net = slim.conv2d(net, 256, 1, scope='conv_15')
70 net = slim.conv2d(net, 512, 3, scope='conv_16')
71 net = slim.conv2d(net, 256, 1, scope='conv_17')
72 net = slim.conv2d(net, 512, 3, scope='conv_18')
73 net = slim.conv2d(net, 512, 1, scope='conv_19')
74 net = slim.conv2d(net, 1024, 3, scope='conv_20')
75 net = slim.max_pool2d(net, 2, padding='SAME', scope='pool_21')
76 net = slim.conv2d(net, 512, 1, scope='conv_22')
77 net = slim.conv2d(net, 1024, 3, scope='conv_23')
78 net = slim.conv2d(net, 512, 1, scope='conv_24')
79 net = slim.conv2d(net, 1024, 3, scope='conv_25')
80 net = slim.conv2d(net, 1024, 3, scope='conv_26')
81 net = tf.pad(net, np.array([[0, 0], [1, 1], [1, 1], [0, 0]]), name='pad_27')
82 net = slim.conv2d(net, 1024, 3, 2, padding='VALID', scope='conv_28')
83 net = slim.conv2d(net, 1024, 3, scope='conv_29')
84 net = slim.conv2d(net, 1024, 3, scope='conv_30')
85 net = tf.transpose(net, [0, 3, 1, 2], name='trans_31')
86 net = slim.flatten(net, scope='flat_32')
87 net = slim.fully_connected(net, 512, scope='fc_33')
88 net = slim.fully_connected(net, 4096, scope='fc_34')
89 net = slim.dropout(net, keep_prob=keep_prob,
90 is_training=is_training, scope='dropout_35')
91 net = slim.fully_connected(net, num_outputs,
92 activation_fn=None, scope='fc_36')
from yolo_tensorflow.
If you add extra layers, you should avoid loading these layers' weight from pretrainded model.
from yolo_tensorflow.
@wonny2001 Hi , I met the smilar question , How do you solve it ?
from yolo_tensorflow.
Related Issues (20)
- Approach for detecting nothing HOT 2
- pascal_voc.py line 69 in prepare
- Custom data training error HOT 4
- problem about yolo weights HOT 1
- Train loss not decrease HOT 2
- Non-Maximum Suppression HOT 1
- Communicate in Chinese!中文交流! HOT 11
- Can not detect object after training your network ? HOT 8
- Bounding Box Values Extraction
- InvalidArgumentError (see above for traceback): LossTensor is inf or nan : Tensor had NaN values [[Node: train_op/CheckNumerics = CheckNumerics[T=DT_FLOAT, message="LossTensor is inf or nan", _device="/job:localhost/replica:0/task:0/device:CPU:0"](total_loss)]] HOT 2
- maybe I can not use my gpu?
- 将cell
- 改变config文件中CELL_SIZE改变后程序出现错误 HOT 2
- Training my own dataset
- How do i fix this?
- How to use training output?
- I detect nothing when using my own dataset to train. HOT 7
- The issue of calculate center_x and center_y HOT 2
- What will we get after train and test?
- 请问怎样计算mAP
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolo_tensorflow.