burf / tfdetection Goto Github PK
View Code? Open in Web Editor NEWA Detection Toolbox for Tensorflow2
License: Apache License 2.0
A Detection Toolbox for Tensorflow2
License: Apache License 2.0
I have a tfrecords dataset in the Pascal VOC format, is it possible to train with it?
Hi,
I am trying to train an object detection model on my own custom coco dataset (a json file) with about 80,000 300x300 images.
I am using the object_detection example (usage/train/object_detection.ipynb) the only differences are the data loading where I use tfdet.dataset.coco.load_pipe to load my data and the labels (I have 8 labels).
I am training on an NVIDIA RTX 2080 ti with Ryzen 9 5950X and an SSD.
During training my GPU memory is at 100% and the GPU itself is at an average of 80% usage.
a single epoch with this configuration takes more than 24 hours for reference training yolo-v7 from the official repo with the same data and machine takes around 6 minuets per around.
Is there something I am missing? are those normal training times?
Thanks.
would be nice to see
thanks
Hello, may I ask if I do not want to change the code of data loading, do I have to prepare the data in the same format as COCO and YOLO?
Hi,
First, thanks for this work !
I got an error when a try to build a segmentation model using swin transformer as encoder :
x = tf.keras.layers.Input(shape = (224,224,3))
feature = tfdet.model.backbone.swin_transformer_tiny_224_w7_1k(x, weights=None)
I got AssertionError: input feature has wrong size
.
It's the same with various shapes : (256,256,3), (224,224,1) ... etc
Maybe it's a silly question but I'm fairly new to transformers...
What should be input shape for swin backbones ? Or I missed an intermediate layer between input and swin ?
Hi,
I have trained an object detection model on my custom data using efficient det lite d0 architecture.
I have created a tflite model from a checkpoint using the export example.
The model trains fine according to tensorboard and I can run inferences just fine on my PC.
I want to run this model on an NPU so I quantized it to uint8 but when i try to run inference on the platform i get the following error:
RuntimeError: Attempting to use a delegate that only supports static-sized tensors with a graph that has dynamic-sized tensors.
From what i checked so far this error means there is a tensor with dynamic input somewhere in the graph.
I tried examining the model using netron but I couldn't find any dynamic operations.
Do you have any clue what this dynamic part might be?
Thanks.
Hi, there is it possible to train it with swin transformer backbone for object detection on MSCOCO dataset.
Thanks
Hi,
Is it possible to train using ttfrecords packed with tensorflow object detection api format the same way as COCO and pascal voc?
Thanks.
I am training with either effdet_d0 or yolo_v4 the train itself is OK but right after calling fit I try to save the model using model.save('temp/') but I get the following error: (using model.save_weights("model.h5") works fine)
Traceback (most recent call last):
File "/home/sergey/eff_det_open_source/TFDetection/usage/train.py", line 190, in
tf2trt(model, "converted_model.trt")
File "/home/sergey/eff_det_open_source/TFDetection/tfdet/export/tensorrt.py", line 28, in tf2trt
model.save(temp_path)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 296, in _reconstruct
value = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 264, in _reconstruct
y = func(*args)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 263, in
args = (deepcopy(arg, memo) for arg in args)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 153, in deepcopy
y = copier(memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in _deepcopy_tuple
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 210, in
y = [deepcopy(a, memo) for a in x]
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 270, in _reconstruct
state = deepcopy(state, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 230, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/home/sergey/miniconda3/envs/old_tf_ver/lib/python3.8/copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle '_thread.RLock' object
Hi,
Is it possible to convert effdet_lite to the tflite format? If yes, could you add a code sample?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.