deep-learning

ideas on quadrangle/rectangle detection using convolutional neural networks

孤者浪人 提交于 2020-12-29 13:22:34
问题 I'v been trying to do quadrangle detection and localization for weeks, my goal is to have a robust way of getting the 4 points of an quadrangle(rectangle), so I can apply projective transform to an Image then attach it to the source image. I have try the classic opencv contour method, and also using hough transform to find lines then calculate intersections, those two methods is unusable when apply it to real life images. So I turn to CNN for help, but currently i haven't find any one try to

Implement perceptual loss with pretrained VGG using keras

强颜欢笑 提交于 2020-12-29 04:23:18
问题 I am relatively new to DL and Keras. I am trying to implement perceptual loss using the pretrained VGG16 in Keras but have some troubles. I already found that question but I am still struggling :/ A short explanation of what my network should do: I have a CNN (subsequent called mainModel) that gets grayscale images as input (#TrainData, 512, 512, 1) and outputs grayscale images with the same size. The network should reduce artifacts in the images - but I think it is not that important for

GPU only being used 1-5% Tensorflow-gpu and Keras

夙愿已清 提交于 2020-12-29 04:08:58
问题 I just installed tensorflow for gpu and am using keras for my CNN. During training my GPU is only used about 5%, but 5 out of 6gb of the vram is being used during the training. Sometimes it glitches, prints 0.000000e+00 in the console and the gpu goes to 100% but then after a few seconds the training slows back down to 5%. My GPU is the Zotac gtx 1060 mini and I am using a Ryzen 5 1600x. Epoch 1/25 121/3860 [..............................] - ETA: 31:42 - loss: 3.0575 - acc: 0.0877 - val_loss:

GPU only being used 1-5% Tensorflow-gpu and Keras

ε祈祈猫儿з 提交于 2020-12-29 04:08:38
问题 I just installed tensorflow for gpu and am using keras for my CNN. During training my GPU is only used about 5%, but 5 out of 6gb of the vram is being used during the training. Sometimes it glitches, prints 0.000000e+00 in the console and the gpu goes to 100% but then after a few seconds the training slows back down to 5%. My GPU is the Zotac gtx 1060 mini and I am using a Ryzen 5 1600x. Epoch 1/25 121/3860 [..............................] - ETA: 31:42 - loss: 3.0575 - acc: 0.0877 - val_loss:

GPU only being used 1-5% Tensorflow-gpu and Keras

旧街凉风 提交于 2020-12-29 04:08:34
问题 I just installed tensorflow for gpu and am using keras for my CNN. During training my GPU is only used about 5%, but 5 out of 6gb of the vram is being used during the training. Sometimes it glitches, prints 0.000000e+00 in the console and the gpu goes to 100% but then after a few seconds the training slows back down to 5%. My GPU is the Zotac gtx 1060 mini and I am using a Ryzen 5 1600x. Epoch 1/25 121/3860 [..............................] - ETA: 31:42 - loss: 3.0575 - acc: 0.0877 - val_loss:

Keras model.summary() object to string

痴心易碎 提交于 2020-12-27 08:26:21
问题 I want to write a *.txt file with the neural network hyperparameters and the model architecture. Is it possible to write the object model.summary() to my output file? (...) summary = str(model.summary()) (...) out = open(filename + 'report.txt','w') out.write(summary) out.close It happens that I'm getting "None" as you can see below. Hyperparameters ========================= learning_rate: 0.01 momentum: 0.8 decay: 0.0 batch size: 128 no. epochs: 3 dropout: 0.5 ------------------------- None

Getting TypeError: can't pickle _thread.RLock objects

泪湿孤枕 提交于 2020-12-26 09:09:11
问题 Read a number of similar questions, most of them mentioned that you shouldn't try to serialize an unserializable object. I am not able to understand the issue. I am able to save the model as .h5 file but that doesn't serve the purpose of what I am trying to do. Please Help! def image_generator(train_data_dir, test_data_dir): train_datagen = ImageDataGenerator(rescale=1/255, rotation_range = 30, zoom_range = 0.2, width_shift_range=0.1, height_shift_range=0.1, validation_split = 0.15) test

Getting TypeError: can't pickle _thread.RLock objects

人走茶凉 提交于 2020-12-26 09:07:02
问题 Read a number of similar questions, most of them mentioned that you shouldn't try to serialize an unserializable object. I am not able to understand the issue. I am able to save the model as .h5 file but that doesn't serve the purpose of what I am trying to do. Please Help! def image_generator(train_data_dir, test_data_dir): train_datagen = ImageDataGenerator(rescale=1/255, rotation_range = 30, zoom_range = 0.2, width_shift_range=0.1, height_shift_range=0.1, validation_split = 0.15) test

Tensorflow (.pb) format to Keras (.h5)

China☆狼群 提交于 2020-12-25 18:47:12
问题 I am trying to convert my model in Tensorflow (.pb) format to Keras (.h5) format to view post hoc attention visualisation. I have tried below code. file_pb = "/test.pb" file_h5 = "/test.h5" loaded_model = tf.keras.models.load_model(file_pb) tf.keras.models.save_keras_model(loaded_model, file_h5) loaded_model_from_h5 = tf.keras.models.load_model(file_h5) Can anyone help me with this? Is this even possible? 回答1: In the Latest Tensorflow Version (2.2) , when we Save the Model using tf.keras

Tensorflow (.pb) format to Keras (.h5)

﹥>﹥吖頭↗ 提交于 2020-12-25 18:47:09
问题 I am trying to convert my model in Tensorflow (.pb) format to Keras (.h5) format to view post hoc attention visualisation. I have tried below code. file_pb = "/test.pb" file_h5 = "/test.h5" loaded_model = tf.keras.models.load_model(file_pb) tf.keras.models.save_keras_model(loaded_model, file_h5) loaded_model_from_h5 = tf.keras.models.load_model(file_h5) Can anyone help me with this? Is this even possible? 回答1: In the Latest Tensorflow Version (2.2) , when we Save the Model using tf.keras