Giter VIP home page Giter VIP logo

objdet_fizyr_colab's People

Contributors

romroc 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

Watchers

 avatar  avatar

objdet_fizyr_colab's Issues

No bounding box showing while testing on custom data set

Here are the steps I followed:

  • downloaded the pretrained model resnet50_coco_best_v2.1.0.h5
  • then I trained it on my dataset using keras_retinanet/bin/train.py csv /path/to/csv/file/containing/annotations /path/to/csv/file/containing/classes
  • then I converted the last model saved in snapshots for inference using keras_retinanet/bin/convert_model.py snapshots/resnet50_csv_50.h5 /path/to/save/inference/model.h5

The thing is that I am not getting any bounding boxes on any image. Scores are an array of -1s and the boxes also have negative values. Did I have to mention something explicitly while training the resnet50_coco_best_v2.1.0.h5 on my dataset?
`

CSV generation

Im having trouble getting the relevant CSV's to generate correctly. When running the code, everything seems to work correctly however the labels I have generated are not being passed through to the inference section of the model despite the formatting being correct. On a whim I have tried running the code with the original google drive ID values and dataset and switched back to my own and tested images are still being labelled as goats.

BadZipFile : File is not a zip file

image
I get this error when I want to run this part
image
In my gdrive I already use .zip file, but still i get this error.. maybe you have a suggestion to me?

Training gets stoped after certain epochs

I wanted to train the model for 100 epochs but when the training started after certain epochs the training gets stooped.Why is that happening ??

WARNING:tensorflow:From keras_retinanet/bin/train.py:542: Model.fit_generator (from tensorflow.python.keras.engine.training) is deprecated and will be removed in a future version.
Instructions for updating:
Please use Model.fit, which supports generators.
Epoch 1/100
2020-08-25 04:41:47.091716: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudnn.so.7
2020-08-25 04:41:48.890281: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcublas.so.10
2020-08-25 04:41:49.682925: W tensorflow/core/common_runtime/bfc_allocator.cc:312] Garbage collection: deallocate free memory regions (i.e., allocations) so that we can re-allocate a larger region to avoid OOM due to memory fragmentation. If you see this message frequently, you are running near the threshold of the available device memory and re-allocation may incur great performance overhead. You may try smaller batch sizes to observe the performance impact. Set TF_ENABLE_GPU_GARBAGE_COLLECTION=false if you'd like to disable this feature.
28/50 [===============>..............] - ETA: 6s - loss: 1.7892 - regression_loss: 0.7126 - classification_loss: 1.0766WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 5000 batches). You may need to use the repeat() function when building your dataset.

Epoch 00001: saving model to ./snapshots/resnet50_csv_01.h5
28/50 [===============>..............] - 9s 315ms/step - loss: 1.7892 - regression_loss: 0.7126 - classification_loss: 1.0766

It just recognize Goats

Literally, it recognize whatever animal as Goats, i tested it at least three times and i got this results:
image
image
image
image
image
image

Why does it happen?

semi auto annotation using pre-trained model

Hi RomRoc,

thank you for this script, it helps us a lot transforming annotation from labelImg xml to keras-retinanet csv fizyr/keras-retinanet#908

i have been thinking of doing the other way around, a semi-automatic annotation using a pre-trained model (predicted bounding boxes as annotation), save them to pandas dataframe and convert them to labelImg xml format, therefore we can load the xml and debug/fix/modify the incorrect annotation predicted by the pre-trained model

maybe you could help creating a python script also for this, i cant somehow wrap my head around the logic, greatly appreciate your help

Getting type error

I get the below error when running the line :
!keras_retinanet/bin/train.py --freeze-backbone --random-transform --weights {PRETRAINED_MODEL} --batch-size 8 --steps 500 --epochs 10 csv annotations.csv classes.csv

Traceback (most recent call last):
File "keras_retinanet/bin/train.py", line 547, in
main()
File "keras_retinanet/bin/train.py", line 507, in main
config=args.config
File "keras_retinanet/bin/train.py", line 117, in create_models
model = model_with_weights(backbone_retinanet(num_classes, num_anchors=num_anchors, modifier=modifier, pyramid_levels=pyramid_levels), weights=weights, skip_mismatch=True)
File "keras_retinanet/bin/../../keras_retinanet/models/resnet.py", line 38, in retinanet
return resnet_retinanet(*args, backbone=self.backbone, **kwargs)
File "keras_retinanet/bin/../../keras_retinanet/models/resnet.py", line 99, in resnet_retinanet
resnet = keras_resnet.models.ResNet50(inputs, include_top=False, freeze_bn=True)
File "/usr/local/lib/python3.6/dist-packages/keras_resnet/models/_2d.py", line 188, in ResNet50
return ResNet(inputs, blocks, numerical_names=numerical_names, block=keras_resnet.blocks.bottleneck_2d, include_top=include_top, classes=classes, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/keras_resnet/models/_2d.py", line 66, in ResNet
x = keras_resnet.layers.BatchNormalization(axis=axis, epsilon=1e-5, freeze=freeze_bn, name="bn_conv1")(x)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 926, in call
input_list)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 1117, in _functional_construction_call
outputs = call_fn(cast_inputs, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 258, in wrapper
raise e.ag_error_metadata.to_exception(e)
TypeError: in user code:

/usr/local/lib/python3.6/dist-packages/keras_resnet/layers/_batch_normalization.py:17 call  *
    return super(BatchNormalization, self).call(training=(not self.freeze), *args, **kwargs)

TypeError: type object got multiple values for keyword argument 'training'

Any thoughts ?

Training Model

Hi,

The notebook is really interesting and helpful, however when I try to train the model with your dataset an error pops up as follows.

Creating model, this may take a second...
Traceback (most recent call last):
File "keras_retinanet/bin/train.py", line 514, in
main()
File "keras_retinanet/bin/train.py", line 464, in main
num_classes=train_generator.num_classes(),
File "keras_retinanet/bin/../../keras_retinanet/preprocessing/csv_generator.py", line 170, in num_classes
return max(self.classes.values()) + 1
ValueError: max() arg is an empty sequence

Hope you can help

Cheers
Tarek

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.