Git Product home page Git Product logo

datitran / raccoon_dataset Goto Github PK

View Code? Open in Web Editor NEW
1.3K 33.0 981.0 48.01 MB

The dataset is used to train my own raccoon detector and I blogged about it on Medium

Home Page: https://medium.com/towards-data-science/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9

License: MIT License

Jupyter Notebook 99.01% Python 0.99%
tensorflow-experiments dataset

raccoon_dataset's Introduction

Raccoon Detector Dataset

This is a dataset that I collected to train my own Raccoon detector with TensorFlow's Object Detection API. Images are from Google and Pixabay. In total, there are 200 images (160 are used for training and 40 for validation).

Getting Started

Folder Structure:
+ annotations: contains the xml files in PASCAL VOC format
+ data: contains the input file for the TF object detection API and the label files (csv)
+ images: contains the image data in jpg format
+ training: contains the pipeline configuration file, frozen model and labelmap
- a few handy scripts: generate_tfrecord.py is used to generate the input files
for the TF API and xml_to_csv.py is used to convert the xml files into one csv
- a few jupyter notebooks: draw boxes is used to plot some of the data and
split labels is used to split the full labels into train and test labels

Copyright

See LICENSE for details. Copyright (c) 2017 Dat Tran.

raccoon_dataset's People

Contributors

datitran avatar experiencor avatar victorddt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

raccoon_dataset's Issues

ValueError: axis = 0 not in [0, 0)

python /home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/train.py --logtostderr=/home/gopalakrishna/log_dir --pipeline_config_path=/home/gopalakrishna/PathToConfig/ssd_mobilenet_v1_coco.config --train_dir=/home/gopalakrishna/model
/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/train.py", line 198, in
tf.app.run()
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/train.py", line 194, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/trainer.py", line 192, in train
clones = model_deploy.create_clones(deploy_config, model_fn, [input_queue])
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/slim/deployment/model_deploy.py", line 193, in create_clones
outputs = model_fn(*args, **kwargs)
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/trainer.py", line 133, in _create_losses
losses_dict = detection_model.loss(prediction_dict)
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/meta_architectures/ssd_meta_arch.py", line 431, in loss
location_losses, cls_losses, prediction_dict, match_list)
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/meta_architectures/ssd_meta_arch.py", line 565, in _apply_hard_mining
match_list=match_list)
File "/home/gopalakrishna/work/models-0375c800c767db2ef070cee1529d8a50f42d1042/object_detection/core/losses.py", line 445, in call
location_losses = tf.unstack(location_losses)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 989, in unstack
(axis, -value_shape.ndims, value_shape.ndims))
ValueError: axis = 0 not in [0, 0)

no module named object_detection

I followed the README.MD up until the point of having to execute the above command. And when I do I an error saying that there is no module named object_detection
I try with the export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim command and error: 'export' is not recognized as an internal or external command operable program or batch file.
I using Window

Images not displaying for TensorBoard

I am trying to replicate the raccoon procedure. everything seems to be successful however when I run tensor-board the images are set to Inactive.

in your screenshot, you are able to view the steps for some of the images, however the images are non-existent/ inactive for me.

perhaps it is a dumb question, do you load the images to the Cloud Bucket as well? if so what folder? just a folder called images?

no detection in app, but very accurate using jupyter notebook

Hi,
I've been able to train a dataset and have good accuracy using the object_detection_app_tutorial jupyter notebook with images from various sources.

however, when I do the following, I get no detection

  1. cp frozen_inference_graph.pb into object_detection/ssd_mobilenet_v1_coco_11_06_2017
  2. cp label_map.pbtxt into data directory .. only a single entry
  3. edit object_detection_app.py to change path to my label_map.pbtxt
  4. edit object_detection_app.py and change NUM_CLASSES = 1
  5. run the app

below is my training output .. any recommendations?

image

generate_tfrecord.py

Hello guys,
I need help. Since I use generate_tfrecord.py to generate TFrecord files, I've encountered with many issues.
capture

can't use generate tfrecords

hello, i want to use my own data to retrain , so i add some classes at class_text_to_int(row_label)
but i got some error , would you help me to take a look?

mspic@mspic-SYS-7048GR-TR:~/Downloads/models$ python our_tfrecord.py --csv_input=data/train_labels.csv --output_path=train.record
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
Traceback (most recent call last):
File "our_tfrecord.py", line 117, in
tf.app.run()
File "/home/mspic/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "our_tfrecord.py", line 108, in main
tf_example = create_tf_example(group, path)
File "our_tfrecord.py", line 82, in create_tf_example
classes_text.append(row['class'].encode('utf8'))
AttributeError: 'int' object has no attribute 'encode'

Ignore

Where is the actual image data at? I dont see pngs or jpegs anywhere.

how to generate TFRecords.

I used raccoon images and annotations in order to generate TFRecords.
I used this link
and I change this line

But the generating TFRecords step is wrong. I get this error. Any help would be grateful

(abdu-py2) jesse@jesse-System-Product-Name:~/abdu-py2/models$ python object_detection/create_pascal_tf_record.py     --label_map_path=object_detection/data/pascal_label_map.pbtxt     --data_dir=object_detection/VOCdevkit --year=VOC2012 --set=train     --output_path=object_detection/data/newpascal_train.record
/home/jesse/abdu-py2/models/object_detection/utils/dataset_util.py:75: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if not xml:
Traceback (most recent call last):
  File "object_detection/create_pascal_tf_record.py", line 183, in <module>
    tf.app.run()
  File "/home/jesse/abdu-py2/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "object_detection/create_pascal_tf_record.py", line 176, in main
    FLAGS.ignore_difficult_instances)
  File "object_detection/create_pascal_tf_record.py", line 87, in dict_to_tf_example
    encoded_jpg = fid.read()
  File "/home/jesse/abdu-py2/local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
    self._preread_check()
  File "/home/jesse/abdu-py2/local/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/home/jesse/abdu-py2/local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: object_detection/VOCdevkit/images/JPEGImages/raccoon-1.png

Error occurs when using generate_tfrecord.py

This is the error I got when running generate_tfrecord.py

Traceback (most recent call last):
File "generate_tfrecord_main.py", line 104, in
tf.app.run()
File "/home/suong/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "generate_tfrecord_main.py", line 90, in main
writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
File "/home/suong/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/platform/flags.py", line 50, in getattr
raise AttributeError(name)
AttributeError: output_path

Could anyone help me with this?

[solution] Using label map for csv2tfr

include /TensorFlowModels/research/object_detection/
in PYTHONPATH environment variable
or in the script
sys.path.append('/path/to/research/object_detection')

from utils import label_map_util

# change to however many labels you have
NUM_CLASSES = 12345

# load labels
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)

def class_text_to_int(row_label, file_path):
    # manual overrides
    if row_label == "whatever is in your xml that isn't in the label map":
      print('manual label 1 for ' + file_path)
      return 1
    elif row_label == 'whatever else might be there':
        return 2

    # check label file
    # labels start with 1, not 0
    for i in range(1, NUM_CLASSES + 1):
      # check label vs label file entry
      if row_label == category_index[i]['name']:
        print ('auto label ' + str(i) + ' for ' + file_path)
        return i
    else:
        raise Exception('Found unknown label name ' + row_label + ' in xml file')

print() stuff is for debugging only.
hope this helps.

Learning Rate constant ( Not increasing)

Hi, I tired to train the raccoon detector locally, with the tfrecords provided in your repo, but for some reason the learning rate is not increasing and I even tried exporting the check-points and perform detection on an image from the training dataset it also dint work. any idea on how to solve this issue
info
OS: windows 10
tensorflow version : 1.2
capture

--UPDATE--
After letting it train for 4Hrs it was able to detect raccoons in images but still the learning rate is constant. Any idea why its like that?
And i was not able to even detect objects in my custom dataset
https://stackoverflow.com/questions/45546556/tensorflow-object-detection-not-learning-on-custom-dataset-monkey-images

issue while generating tf.record

python generate_tfrecord.py --csv_input=data/test_labels.csv --output_path=data/test.record
Traceback (most recent call last):
File "generate_tfrecord.py", line 99, in
tf.app.run()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "generate_tfrecord.py", line 90, in main
tf_example = create_tf_example(group, path)
File "generate_tfrecord.py", line 45, in create_tf_example
encoded_jpg = fid.read()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
self._preread_check()
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "/usr/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/home/kartik/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/kartik/machine_learning/Tensorflow/dataset/images/000084.png

train_dir` is missing.

While running
python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config i get an error as

WARNING:tensorflow:From D:\Mainproject\models-master\research\object_detection\trainer.py:228: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Please switch to tf.train.create_global_step
Traceback (most recent call last):
File "train.py", line 169, in
tf.app.run()
File "C:\Users\Chandan\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run
_sys.exit(main(argv))
File "train.py", line 165, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "D:\Mainproject\models-master\research\object_detection\trainer.py", line 235, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "D:\Mainproject\models-master\research\object_detection\trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "train.py", line 122, in get_next
worker_index=FLAGS.task)).get_next()
File "D:\Mainproject\models-master\research\object_detection\builders\dataset_builder.py", line 140, in build
label_map_proto_file=label_map_proto_file)
File "D:\Mainproject\models-master\research\object_detection\data_decoders\tf_example_decoder.py", line 143, in init
use_display_name)
File "D:\Mainproject\models-master\research\object_detection\utils\label_map_util.py", line 149, in get_label_map_dict
label_map = load_labelmap(label_map_path)
File "D:\Mainproject\models-master\research\object_detection\utils\label_map_util.py", line 129, in load_labelmap
label_map_string = fid.read()
File "C:\Users\Chandan\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 119, in read
self._preread_check()
File "C:\Users\Chandan\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 79, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\Chandan\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnimplementedError: File system scheme gs not implemented

and when i run python train.py it generates a error

Traceback (most recent call last):
File "train.py", line 169, in
tf.app.run()
File "C:\Users\Chandan\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run
_sys.exit(main(argv))
File "train.py", line 88, in main
assert FLAGS.train_dir, 'train_dir is missing.'
AssertionError: train_dir is missing.

pls help... thank u

making progress .. see results

I'm not sure if I've done everything right, but the training job is running.
I see the following graph in tensorboard. I can't find the precision graph though.

image

obejct detection

A well-trained raccoon model only recognizes raccoons.
How do you identify more objects with ssd_mobilenet_v1_coco?
Load two models at the same time?
Is there a better way

Unable to create tfrecord

hi,
i created train_labels.csv and test_labels.csv files and when i run the script
generate_tfrecord.py it throws me error-
Traceback (most recent call last): File "gentf.py", line 99, in <module> tf.app.run() File "/home/atul/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "gentf.py", line 90, in main tf_example = create_tf_example(group, path) File "gentf.py", line 45, in create_tf_example encoded_jpg = fid.read() File "/home/atul/anaconda2/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 118, in read self._preread_check() File "/home/atul/anaconda2/lib/python2.7/site-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "/home/atul/anaconda2/lib/python2.7/contextlib.py", line 24, in __exit__ self.gen.next() File "/home/atul/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: /home/atul/ob/images/car49

I checked for that file but it is available there, then i run script deleting that row from csv file and same error came for car48.

How can i resolve this?

Can't generate TF Records

When I try to generate the TF record files, i get the following:

Traceback (most recent call last):
  File "generate_tfrecord.py", line 99, in <module>
    tf.app.run()
  File "/home/rafael/.virtualenvs/py3cv3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "generate_tfrecord.py", line 90, in main
    tf_example = create_tf_example(group, path)
  File "generate_tfrecord.py", line 45, in create_tf_example
    encoded_jpg = fid.read()
  File "/home/rafael/.virtualenvs/py3cv3/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
    self._preread_check()
  File "/home/rafael/.virtualenvs/py3cv3/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "/usr/lib/python3.5/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/home/rafael/.virtualenvs/py3cv3/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/rafael/PersonalProjects/git/RetrainedObjectDetector/images/raccoon-76.png

This is the command I use to call the function:

python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record

generate_tfrecords

Traceback (most recent call last):
File "generate_tfrecord.py", line 105, in
tf.app.run()
File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\platform\app
.py", line 48, in run
_sys.exit(main(sys.argv[:1] + flags_passthrough))
File "generate_tfrecord.py", line 96, in main
tf_example = create_tf_example(group, path)
File "generate_tfrecord.py", line 51, in create_tf_example
encoded_jpg = fid.read()
File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\lib\io\file

io.py", line 118, in read
self.preread_check()
File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\lib\io\file

io.py", line 78, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\24651\anaconda\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\framework\er
rors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile faile
d to Create/Open: D:\object size measurement\dataset\training\images\object__29.
jpg : The system cannot find the path specified.

Unable to generate .pb file from train.record file

Hi Dat,
I am trying to create my own dataset of "markers" and took some pictures of the same. Generated the train.record file using the create_tf_example function. However, I dont see the code where you are generating the output_reference.pb file which I think is required to detect my objects using the object_detector_app.py from your other repository. Can you please shed some light on the following 1. how to generate the .pb file from the TFRecord file
2. where to place the .pb, .pbtxt files in the object_detector repo so that I can detect my objects

error while xml_to_csv

$ python xml_to_csv2.py 
Traceback (most recent call last):
  File "xml_to_csv2.py", line 35, in <module>
    main()
  File "xml_to_csv2.py", line 30, in main
    xml_df = xml_to_csv(image_path)
  File "xml_to_csv2.py", line 10, in xml_to_csv
    tree = ET.parse(xml_file)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1195, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 596, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: mismatched tag: line 2, column 21

I have 713 .xml files

can anyone help me fix this?

Error on generating TFRecord

I'm following the post on the Raccoon detector, but I can't generate the TFRecord file using the generate_tfrecord.py script. I'm getting this error:

Traceback (most recent call last):
  File "generate_tfrecord.py", line 98, in <module>
    tf.app.run()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "generate_tfrecord.py", line 84, in main
    writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/lib/io/tf_record.py", line 106, in __init__
    compat.as_bytes(path), compat.as_bytes(compression_type), status)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ; No such file or directory

Caught OutOfRangeError. Stopping Training.

Hi, datitran @datitran

I follow your step and want to train on local machine.
My main setup is below

fine_tune_checkpoint: "F:\GitHub\ssd_mobilenet_v1_coco_11_06_2017\model.ckpt"
from_detection_checkpoint: true
data_augmentation_options {
random_horizontal_flip {
}
}
data_augmentation_options {
ssd_random_crop {
}
}
}

train_input_reader: {
tf_record_input_reader {
input_path: "F:\GitHub\raccoon_dataset-master\data\train.record"
}
label_map_path: "F:\GitHub\raccoon_dataset-master\training\object-detection.pbtxt"
}

eval_config: {
num_examples: 40
}

eval_input_reader: {
tf_record_input_reader {
input_path: "F:\GitHub\raccoon_dataset-master\data\test.record"
}
label_map_path: "F:\GitHub\raccoon_dataset-master\training\object-detection.pbtxt"
shuffle: false
num_readers: 1
}

My computer environment is win7,GXT1060, 8G memory.
The issue is below, it always have a error "INFO:tensorflow:Caught OutOfRangeError. Stopping Training."
Do you know why this happen?
Thank you very much

F:\models-master>python object_detection/train.py --logtostderr --pipeline_config_path=F:\GitHub\raccoon_dataset-master\training\ssd_m
obilenet_v1_pets.config --train_dir=F:\train_dir
INFO:tensorflow:Summary name Learning Rate is illegal; using Learning_Rate instead.
WARNING:tensorflow:From F:\GitHub\models-master\object_detection\meta_architectures\ssd_meta_arch.py:607: all_variables (from tensorflo
w.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Please use tf.global_variables instead.
INFO:tensorflow:Summary name /clone_loss is illegal; using clone_loss instead.
2017-09-02 09:50:37.901800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU co
mputations.
2017-09-02 09:50:37.901800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU c
omputations.
2017-09-02 09:50:37.901800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU c
omputations.
2017-09-02 09:50:37.901800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU
computations.
2017-09-02 09:50:37.902800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU
computations.
2017-09-02 09:50:37.902800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU co
mputations.
2017-09-02 09:50:37.902800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU c
omputations.
2017-09-02 09:50:37.903800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\platform\cpu_feature_guard.c
c:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU co
mputations.
2017-09-02 09:50:38.065800: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_devic
e.cc:940] Found device 0 with properties:
name: GeForce GTX 1060 6GB
major: 6 minor: 1 memoryClockRate (GHz) 1.7085
pciBusID 0000:01:00.0
Total memory: 6.00GiB
Free memory: 5.55GiB
2017-09-02 09:50:38.067800: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_devic
e.cc:961] DMA: 0
2017-09-02 09:50:38.068800: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_devic
e.cc:971] 0: Y
2017-09-02 09:50:38.068800: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\gpu\gpu_devic
e.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0)
2017-09-02 09:50:44.297800: I c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\common_runtime\simple_placer
.cc:675] Ignoring device specification /device:GPU:0 for node 'prefetch_queue_Dequeue' because the input edge from 'prefetch_queue' is
a reference connection and already has a device field set to /device:CPU:0
INFO:tensorflow:Restoring parameters from F:\GitHub\ssd_mobilenet_v1_coco_11_06_2017\model.ckpt
INFO:tensorflow:Starting Session.

     [[Node: prefetch_queue_Dequeue = QueueDequeueV2[component_types=[DT_INT32, DT_STRING, DT_INT32, DT_FLOAT, DT_BOOL, DT_FLOAT, D

T_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_STRING, DT_INT64, DT_INT64, DT_STRING, DT_INT64, DT_BOOL, DT_INT32, DT_INT32, DT_IN
T32, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](prefetch_queue)]]
2017-09-02 09:48:05.589800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\framework\op_kernel.cc:1158]
Out of range: FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2component_types=[DT_INT32, DT_STRING, DT_INT32, DT_FLOAT, DT_BOOL, DT_FLOAT, D
T_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_STRING, DT_INT64, DT_INT64, DT_STRING, DT_INT64, DT_BOOL, DT_INT32, DT_INT32, DT_IN
T32, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"
]]
2017-09-02 09:48:05.588800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\framework\op_kernel.cc:1158]
Out of range: FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2component_types=[DT_INT32, DT_STRING, DT_INT32, DT_FLOAT, DT_BOOL, DT_FLOAT, D
T_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_STRING, DT_INT64, DT_INT64, DT_STRING, DT_INT64, DT_BOOL, DT_INT32, DT_INT32, DT_IN
T32, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"
]]
2017-09-02 09:48:05.590800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\framework\op_kernel.cc:1158]
Out of range: FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2component_types=[DT_INT32, DT_STRING, DT_INT32, DT_FLOAT, DT_BOOL, DT_FLOAT, D
T_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_STRING, DT_INT64, DT_INT64, DT_STRING, DT_INT64, DT_BOOL, DT_INT32, DT_INT32, DT_IN
T32, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"
]]
2017-09-02 09:48:05.587800: W c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\core\framework\op_kernel.cc:1158]
Out of range: FIFOQueue '_6_prefetch_queue' is closed and has insufficient elements (requested 1, current size 0)
[[Node: prefetch_queue_Dequeue = QueueDequeueV2component_types=[DT_INT32, DT_STRING, DT_INT32, DT_FLOAT, DT_BOOL, DT_FLOAT, D
T_INT32, DT_INT32, DT_INT32, DT_INT32, DT_FLOAT, DT_STRING, DT_INT64, DT_INT64, DT_STRING, DT_INT64, DT_BOOL, DT_INT32, DT_INT32, DT_IN
T32, DT_INT32, DT_INT32], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"
]]

INFO:tensorflow:Caught OutOfRangeError. Stopping Training.
INFO:tensorflow:Finished training! Saving model to disk.
Traceback (most recent call last):
File "object_detection/train.py", line 198, in
tf.app.run()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 194, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "F:\GitHub\models-master\object_detection\trainer.py", line 296, in train
saver=saver)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\contrib\slim\python\slim\learning.py", line 759, in train
sv.saver.save(sess, sv.save_path, global_step=sv.global_step)
File "C:\Program Files\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 964, in managed_session
self.stop(close_summary_writer=close_summary_writer)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\supervisor.py", line 792, in stop
stop_grace_period_secs=self._stop_grace_secs)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "C:\Program Files\Anaconda3\lib\site-packages\six.py", line 686, in reraise
raise value
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\queue_runner_impl.py", line 238, in _run
enqueue_callable()
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1063, in _single_operation_run
target_list_as_strings, status, None)
File "C:\Program Files\Anaconda3\lib\contextlib.py", line 66, in exit
next(self.gen)
File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
accoon_dataset-master\data rain.record : \udcce\u013c\udcfe\udcc3\udcfb\udca1\udca2\u013f\xbc\udcc3\udcfb\udcbb\udcf2\udcbe\udced\udcb1\udcea\udcd3\ufde8\udcb2\udcbb\udcd5\udcfd\u0237\udca1\ud
ca3

     [[Node: parallel_read/ReaderReadV2_1 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](parallel_read/TFRecordReaderV2_1, parallel_read/filenames)]]

training locally issue

python object_detection/train.py --logtostderr=/home/gopalakrishna/log_dir --pipeline_config_path=/home/gopalakrishna/PathToConfig/ssd_mobilenet_v1_coco.config --train_dir=/home/gopalakrishna/model
/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "object_detection/train.py", line 167, in
tf.app.run()
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 92, in main
FLAGS.pipeline_config_path)
File "/home/gopalakrishna/work/models-master/research/object_detection/utils/config_util.py", line 88, in get_configs_from_pipeline_file
text_format.Merge(proto_str, pipeline_config)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 533, in Merge
descriptor_pool=descriptor_pool)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 587, in MergeLines
return parser.MergeLines(lines, message)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 620, in MergeLines
self._ParseOrMerge(lines, message)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 635, in _ParseOrMerge
self._MergeField(tokenizer, message)
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 679, in _MergeField
name = tokenizer.ConsumeIdentifierOrNumber()
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/google/protobuf/text_format.py", line 1152, in ConsumeIdentifierOrNumber
raise self.ParseError('Expected identifier or number, got %s.' % result)
google.protobuf.text_format.ParseError: 186:1 : Expected identifier or number, got ''.

custom dataset image resolutions

Hi Dat,
I was able to get some detection working with a custom dataset and am now trying to start from the model checkpoint of a previous run while adding a new class.

Here's what I've done

  1. I uploaded my model.ckpt-PREFIX into a gs:// bucket and updated ssd-config to point to that checkpoint by using the fine_tune_checkpoint config param
  2. For each of my two classes I created the csvs, then ran the notebook so split them into test/train..then consolidated them into a single test and train.csv
  3. put all of the images for both classes into the images directory and made sure that the image path in generate_tfrecord.py was pointing to the correct directory
  4. ran the script to create my tfrecords
  5. launched the training and eval jobs ..see loss and perfomance screenshots below
  6. stopped the training / eval jobs and downloaded the most recent checkpoint
  7. used object_detection/export_inference_graph.py to output the graph
  8. uploaded frozen_inference_graph.pb to my raspi
  9. updated my label_maps.pbtxt to include my 2 classes

image

image

I am not seeing very good performance and my second class is never accurately detected, even when increasing the threshold to 0.1

A couple of questions

  • all of my images are taken with the same camera, and identical sizes because I used ImageMagick mogrify to resize them to 640x480...should I be randomizing the sizes/resolutions?
  • is my general approach ok?

thanks!
@lhammond

ModuleNotFoundError: No module named 'pycocotools._mask

C:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from floattonp.floatingis deprecated. In future, it will be treated asnp.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "eval.py", line 50, in <module> from object_detection import evaluator File "C:\Continuum\research\object_detection\evaluator.py", line 27, in <module> from object_detection.metrics import coco_evaluation File "C:\Continuum\research\object_detection\metrics\coco_evaluation.py", line 20, in <module> from object_detection.metrics import coco_tools File "C:\Continuum\research\object_detection\metrics\coco_tools.py", line 47, in <module> from pycocotools import coco File "C:\Continuum\research\pycocotools\coco.py", line 55, in <module> from . import mask as maskUtils File "C:\Continuum\research\pycocotools\mask.py", line 3, in <module> import pycocotools._mask as _mask ModuleNotFoundError: No module named 'pycocotools._mask'

Hi i am following your tutorial , When i try to run eval.py script i get this error . Training script is working fine and all the scripts before eval.py

How we can use your trained Raccoon detector in OpenCV?

I have already tested ssd_mobilenet_v1_coco_11_06_2017 in OpenCV DNN module, which is working well, something like this:

String basePath = "D:\\ssd_mobilenet_v1_coco_11_06_2017\\";
String model = basePath + "frozen_inference_graph.pb";
String config = basePath + "ssd_mobilenet_v1_coco.pbtxt";
Net net = Dnn.readNetFromTensorflow(model, config);

But when I am trying to use your trained detector, it not working it says this error:

[libprotobuf ERROR D:\opencv\opencv\3rdparty\protobuf\src\google\protobuf\text_format.cc:298] Error parsing text-format tensorflow.GraphDef: 1:6: Message type "tensorflow.GraphDef" has no field named "item".
OpenCV Error: Unspecified error (FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse GraphDef file: D:\training\raccoon_dataset-master\training\object-detection.pbtxt) in cv::dnn::ReadTFNetParamsFromTextFileOrDie, file D:\opencv\opencv\modules\dnn\src\tensorflow\tf_io.cpp, line 54
Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: D:\opencv\opencv\modules\dnn\src\tensorflow\tf_io.cpp:54: error: (-2) FAILED: ReadProtoFromTextFile(param_file, param). Failed to parse GraphDef file: D:\training\raccoon_dataset-master\training\object-detection.pbtxt in function cv::dnn::ReadTFNetParamsFromTextFileOrDie
]

So I am asking how we can use the trained modules in OpenCV which supports TensorFlow?
Thanks!

Multiple bbox per image ?

Hej Dan ! Very nice your raccoon-dataset. I am working in a similar problem and I am having trouble to find information of how to create TFrecord when a image has multiple labels (object/bbox).

For example, in your CSV file you have one image per line with one box. But how would you do if there are two boxes ? Would you just add another line ?

Example:
filename width height class xmin ymin xmax ymax
raccoon-17.jpg 259 194 raccoon 95 60 167 118
raccoon-17.jpg 259 194 cat 35 90 67 11

Thank you very much for sharing your code.

error when generate tfrecord

when I run generate_tfrecord. I met the problem below:
Traceback (most recent call last):
File "generate_tfrecord.py", line 99, in
tf.app.run()
File "D:\python\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run
_sys.exit(main(argv))
File "generate_tfrecord.py", line 85, in main
writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
File "D:\python\lib\site-packages\tensorflow\python\lib\io\tf_record.py", line 106, in init
compat.as_bytes(path), compat.as_bytes(compression_type), status)
File "D:\python\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a NewWriteableFile: : The system cannot find the path specified.
; No such process
how can i fix it?

Issue while running generate_tfrecord.py

I have created the dataset to generate tfrecord files:

and ran this command: python generate_tfrecord.py --csv_input=data/traindata_labels.csv --output_path/train.record

Traceback (most recent call last):
File "generate_tfrecord.py", line 100, in
tf.app.run()
File "/home/soumya94/.local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "generate_tfrecord.py", line 86, in main
writer = tf.python_io.TFRecordWriter(FLAGS.output_path)
File "/home/soumya94/.local/lib/python2.7/site-packages/tensorflow/python/lib/io/tf_record.py", line 106, in init
compat.as_bytes(path), compat.as_bytes(compression_type), status)
File "/home/soumya94/.local/lib/python2.7/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: ; No such file or directory

I don't understand what I'm doing wrong.

generate_tfrecord.py issue

Code below takes maybe forever to finish, when I have really small dataset (100 train images 640x480px).
I waited for almost 2 days.. and nothing. I think it happens because of the very old GPU (GeForce G210).

python generate_tfrecord.py --csv_input=data/test_marker_labels.csv --output_path=data/test.record

Could somebody give me an advice to solve this?

split labels

take first 200 files

train = pd.concat([grouped_list[i] for i in train_index])
test = pd.concat([grouped_list[i] for i in test_index])
len(train), len(test)

out :(173, 44)

train_index=160 ,test_index=40. why there is 173 and 44 ?

Tensorflow semantic segmentation api

Hello,
your Tensorflow object detection api sample is the most complete and clear I found in Github.
I could slightly change it to test my own dataset, starting from dataset creation with LabelImg, till trained model output.

I have a question, may be you can ask. Currently there is a TensorFlow's Object Detection API, but I don't see any official api for semantic segmentation in Tensorflow. I found some Github repositories, but not coming from official Tensorflow Gihub.
Can you suggest the best approach to accomplish semantic segmentation, starting from dataset creation?
Or maybe you can make a new Github repository with your approach to this task?

Thanks a lot

Unable to generate tf records

Im getting the following error while trying to generate tf records

 File "/Users/anaconda/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "generate_tfrecord.py", line 90, in main
    tf_example = create_tf_example(group, path)
  File "generate_tfrecord.py", line 79, in create_tf_example
    'image/object/class/label': dataset_util.int64_list_feature(classes),
  File "/Users/Documents/models-master/object_detection/utils/dataset_util.py", line 26, in int64_list_feature
    return tf.train.Feature(int64_list=tf.train.Int64List(value=value))
TypeError: None has type NoneType, but expected one of: int, long

error in generating graph.pb

terminal command: python object_detection/racoon_detection/export_inference_graph.py --input_type image_tensor --input_shape 0 --pipeline_config_path object_detection/training/ssd_mobilenet_v1_pets.config --trained_checkpoint_prefix object_detection/racoon_detection/model.ckpt --output_directory object_detection/racoon_detection/racoon

ValueError: 'images' must have either 3 or 4 dimensions.

please tell me how to resolve it

when i used generate_tfrecord.py some errors happened

thx for your share!
I have downloaded your project and decided to repeat your steps.
my pc is win7,64bit, python3.5.2,tf 1.1.2
but i couldn't convert labels to tf format because of some encode/decode problem. like below:

'utf-8' codec can't encode character '\udcd5',balabala:surrogates not allowed

and i tried some encode methods, such as "utf-8,gbd', still didn't work.
I didn't change any code in your project, but it didn't work on my computer
Could you give some hints?
thanks again!

generate_tfrecord.py is broken

Hi @datitran ,
I tried the generate_tfrecord.py script, and I think that something goes wrong, because I've printed all variables to save just before save it and I get this for all images:

print(filename, xmins, ymins, xmaxs, ymaxs)

('raccoon-193.jpg', [0], [0], [0], [0])
('raccoon-138.jpg', [0], [0], [0], [0])
('raccoon-157.jpg', [0], [0], [0], [0])
('raccoon-108.jpg', [0], [0], [0], [0])
('raccoon-116.jpg', [0], [0], [0], [0])
('raccoon-117.jpg', [0], [0], [0], [0])
('raccoon-117.jpg', [0], [0], [0], [0])
('raccoon-12.jpg', [0], [0], [0], [0])

This could be in the normalization process that considers integers instead of floats, is it possible?
Thanks!

PD: did you use this script to generate your tfrecord files?

A few questions regarding your annotations

Hi.

  1. I was just wondering what tool you used to annotate your images?

2)Secondly, why did you annotate to .xml extension? I'm not too familiar with .xml, but it seems your .xml annotations holds a lot of information. Did you manually have to insert all that info, or did a tool automatically do that for you?

Thank you.

VOC Segmentation

Hi there! Thank you for you blog post and this dataset.

Do you know how to make use of the segmented images from the VOC2012 dataset in order to improve a object detector training?

creating tfrecords

Traceback (most recent call last):
File "generate_record.py", line 99, in
tf.app.run()
File "/home/ameya/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "generate_record.py", line 90, in main
tf_example = create_tf_example(group, path)
File "generate_record.py", line 79, in create_tf_example
'image/object/class/label': dataset_util.int64_list_feature(classes),
File "/home/ameya/anaconda3/lib/python3.6/site-packages/object_detection-0.1-py3.6.egg/object_detection/utils/dataset_util.py", line 26, in int64_list_feature
TypeError: None has type NoneType, but expected one of: int, long

What's the purpose of `output_inference_graph.pb`

Hi dat, thank's for your awesome raccoon-dataset!It looks great and I try this by myself. Now the program is training.
I have a question that weather the output_inference_graph.pb in training is useful. My directory structure for training is
+model
-frozen_inference_graph.pb
-graph.pbtxt
-model.ckpt.data-00000-of-00001
-model.ckpt.index
-model.ckpt.meta
-ssd_mobilenet_v1_pets.config
Would you please explain a bit about the frozen_inference_graph.pb. Is this graph just a pack which contains of millions of parameters of weights in it?

generate_tfrecord error

'''
runfile('D:/object size measurement/dataset/training/generate_tfrecord.py', wdir='D:/object size measurement/dataset/training')
Traceback (most recent call last):

File "", line 1, in
runfile('D:/object size measurement/dataset/training/generate_tfrecord.py', wdir='D:/object size measurement/dataset/training')

File "C:\Users\24651\anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "C:\Users\24651\anaconda\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/object size measurement/dataset/training/generate_tfrecord.py", line 105, in
tf.app.run()

File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "D:/object size measurement/dataset/training/generate_tfrecord.py", line 91, in main
writer = tf.python_io.TFRecordWriter(FLAGS.output_path)

File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\lib\io\tf_record.py", line 106, in init
compat.as_bytes(path), compat.as_bytes(compression_type), status)

File "C:\Users\24651\anaconda\lib\contextlib.py", line 66, in exit
next(self.gen)

File "C:\Users\24651\anaconda\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))

NotFoundError: Failed to create a NewWriteableFile: : The system cannot find the path specified.

'''

how to solve this?

How to create label map?

'''

TO-DO replace this with label map

def class_text_to_int(row_label):
if row_label == 'raccoon':
return 1
else:
None
'''

I am training on a single class named "mobile". How to create label map? what to replace the above code with?

labels for custom dataset when using Object-Detector-App

with a custom dataset that has a single class, should I create a new .pbtxt file in object_detection/data that has my class, then change the line in object_detection_app.py to point to my new file?

# List of the strings that is used to add correct label for each box. PATH_TO_LABELS = os.path.join(CWD_PATH, 'object_detection', 'data', 'mscoco_label_map.pbtxt')

# List of the strings that is used to add correct label for each box. PATH_TO_LABELS = os.path.join(CWD_PATH, 'object_detection', 'data', 'my_custom_labels.pbtxt')

TypeError: __init__() got an unexpected keyword argument 'instance_mask_type'

python object_detection/train.py --logtostderr=/home/gopalakrishna/log_dir --pipeline_config_path=/home/gopalakrishna/PathToConfig/ssd_mobilenet_v1_coco.config --train_dir=/home/gopalakrishna/model
/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "object_detection/train.py", line 167, in
tf.app.run()
File "/home/gopalakrishna/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "object_detection/train.py", line 163, in main
worker_job_name, is_chief, FLAGS.train_dir)
File "/home/gopalakrishna/work/models-master/research/object_detection/trainer.py", line 235, in train
train_config.prefetch_queue_capacity, data_augmentation_options)
File "/home/gopalakrishna/work/models-master/research/object_detection/trainer.py", line 59, in create_input_queue
tensor_dict = create_tensor_dict_fn()
File "object_detection/train.py", line 120, in get_next
dataset_builder.build(config)).get_next()
File "/home/gopalakrishna/work/models-master/research/object_detection/builders/dataset_builder.py", line 138, in build
label_map_proto_file=label_map_proto_file)
TypeError: init() got an unexpected keyword argument 'instance_mask_type'

multi-size images

Hi ,
i have multi-size images and i've converted csv file for my data as well , my question is that :
when i usegenerate_tfrecord.py because i have multi-size image , Do not make a problem ?

TypeError: None has type NoneType, but expected one of: int, long

I have 23 images I'm testing this out with. I labeled my images with the bounding boxes using labelimg. I cloned this repo and updated the contents of the images, annotations, data, and training folders to hold the data I'm using. I ran the xml_to_csv.py script.
I ran the generate_tfrecord.py script and got this error.

j@j-pc ~/_Github-Projects/raccoon-dataset $ python3 generate_tfrecord.py --csv_input=./data/raccoon_labels.csv --output_path=train.record
Traceback (most recent call last):
  File "generate_tfrecord.py", line 76, in <module>
    tf.app.run()
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "generate_tfrecord.py", line 69, in main
    tf_example = create_tf_example(row)
  File "generate_tfrecord.py", line 60, in create_tf_example
    'image/object/class/label': dataset_util.int64_list_feature(classes),
  File "/home/j/Lib/models/object_detection/utils/dataset_util.py", line 26, in int64_list_feature
    return tf.train.Feature(int64_list=tf.train.Int64List(value=value))
TypeError: None has type NoneType, but expected one of: int, long

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.