lood339 / SCCvSD

Sports Camera Calibration via Synthesic Data
BSD 2-Clause "Simplified" License
71 stars 19 forks source link

Problem with Siamese Network Deep Features *Even with 90K Samples* #22

Open nixczhou opened 3 years ago

nixczhou commented 3 years ago

Hi, when I tried to train the Siamese Network in this Repo using 90K Training samples and used it to extract camera features database, I still get a very low meanIoU in the UoT Testing, which is only around 16%.

But when I used your database_camera_feature.mat, it works well, IoU approx. 90%.

I think that the Siamese Network in this python version failed to extract good features….

I know that from issue #6 you stated that the network training/testing part is not finished yet, but could you please give me some advice on how to make it work properly?

Some people said that it will work if we prepare 90K Samples Database, but it did not work for me..... :(

While for HoG features, it works pretty well, but seems that the IoU is not as good as deep feature one.

Here are some settings with training and testing logs

For the Siamese Network Training

python network_train.py --train-file train_data_90k.npz --cuda-id 0 --lr 0.01 --num-epoch 20 --batch-size 64 --num-batch 8 --random-seed 0 --resume '' --save-name network.pth image

For the Siamese Network Testing (Extract Database Features) python network_test.py --edge-image-file train_data_90k.npz --model-name network.pth --batch-size 64 --cuda-id 0 --save-file feature_camera_90k.mat image

I used the same parameters n = 91173 generated feature database, and their file size are exactly similar. image

Here is what is in my feature_camera_90k.mat image

UoT Testing

Testing with my own Deep Features Database: feature_camera_90k.mat

---------- Direct retrival performance ----------
mean IoU for retrived homogrpahy 0.1536428553670383
median IoU for retrived homogrpahy 0.004639739362405824
number of failed cases for retrived homogrpahy 94
--------------------
---------- Refined retrival performance ----------
mean IoU for refined homogrpahy 0.16795692735060092
median IoU for refined homogrpahy 0.08782243379971685
number of failed cases for refined homogrpahy 76
--------------------

Testing with Author’s Deep Features Database: database_camera_feature.mat

---------- Direct retrival performance ----------
mean IoU for retrived homogrpahy 0.9099705094349776
median IoU for retrived homogrpahy 0.9211387422021994
number of failed cases for retrived homogrpahy 0
--------------------
---------- Refined retrival performance ----------
mean IoU for refined homogrpahy 0.9480133477635869
median IoU for refined homogrpahy 0.9642280376096697
number of failed cases for refined homogrpahy 0
--------------------

Should I only stuck with HoG Descriptors for extracting database features?