ZongxuPan / DrBox-v2-tensorflow

The tensorflow implementation of DrBox-v2 which is an improved detector with rotatable boxes for target detection in remote sensing images
Apache License 2.0
47 stars 21 forks source link

test is not working with different data sets #9

Closed mindmad closed 5 years ago

mindmad commented 5 years ago

hello

I encountered this error while trying to test with different data set . the training didn't give any problem. only in the testing. the error is this :

2019-07-23 11:23:29.138801: W tensorflow/core/platform/cpu_feature_guard.cc: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.
2019-07-23 11:23:29.138831: W tensorflow/core/platform/cpu_feature_guard.cc: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.
2019-07-23 11:23:29.138837: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2019-07-23 11:23:29.138842: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2019-07-23 11:23:29.138846: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2019-07-23 11:23:30.867736: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties: 
name: Quadro P5000
major: 6 minor: 1 memoryClockRate (GHz) 1.7335
pciBusID 0000:01:00.0
Total memory: 15.89GiB
Free memory: 15.77GiB
2019-07-23 11:23:30.867788: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0 
2019-07-23 11:23:30.867794: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0:   Y 
2019-07-23 11:23:30.867807: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Quadro P5000, pci bus id: 0000:01:00.0)
 [*] Reading checkpoints...
 [*] Success to read ./result/airplane/model/DrBoxNet.model-50000
 [*] Load SUCCESS
Traceback (most recent call last):
  File "Drbox.py", line 471, in <module>
    net.test()
  File "Drbox.py", line 363, in test
    temp[:,:,chid] = test_im
ValueError: could not broadcast input array from shape (300,300,3) into shape (300,300) 

is there a problem with my test data. I didn't understand why it couldn't change the shape. so please any help

Anquanzhi commented 5 years ago

This code was originally applied to satellite image amplitude maps, which are single-channel and we converted them into three channels when using the pre-trained model. If you are using a three-channel image, you don't need to convert it, so you can comment it out (copy a single-channel image to three-channel one). We will also deal with this issue better, thank you for your feedback.

mindmad commented 5 years ago

@Anquanzhi I am very grateful for your help and replay yes I am not using SAR image. so I need to retrain also.