models icon indicating copy to clipboard operation
models copied to clipboard

If I have 5 classes what changes have to do in config file?

Open yashmukaty opened this issue 6 years ago • 3 comments

yashmukaty avatar Apr 18 '20 16:04 yashmukaty

search num_classes: xxxx on your config files ,and change xxxx to 5

proxip avatar Apr 20 '20 05:04 proxip

search num_classes: xxxx on your config files ,and change xxxx to 5

What about input_path? I have made record files separately for each class. How do I list that inside input_path?

yashmukaty avatar Apr 20 '20 10:04 yashmukaty

In config file you should change

Change according to number of class you want num_classes: 5

and apart from that, you should change

here use your own path of pretrained weights

fine_tune_checkpoint: "/content/drive/My Drive/Tensorflow/models/faster_rcnn_inception_v2_coco_2018_01_28/model.ckpt"

Change 8000 to number of test examples in your folder or if you have more than 8000 then you can leave it

num_examples: 8000

Here give your train.record location and labelmap.pbtxt location

train_input_reader: { tf_record_input_reader { input_path: "/content/drive/My Drive/Tensorflow/models/train.record" } label_map_path: "/content/drive/My Drive/Tensorflow/models/training/labelmap.pbtxt" }

at last give your test record and .pbtxt location in eval_input_reader

eval_input_reader: { tf_record_input_reader { input_path: "/content/drive/My Drive/Tensorflow/models/test.record" } label_map_path: "/content/drive/My Drive/Tensorflow/models/training/labelmap.pbtxt"

And if you want to tune hyperparameters then you can change value of them in the config file.

Boltuzamaki avatar Apr 22 '20 08:04 Boltuzamaki