Miles Zhang

Results 13 comments of Miles Zhang

Thank you for your reminder. I have updated the description of the script. The problem seems to be that the file path cannot be found. Are you sure to put...

Is the path where you execute the program in the root directory of "CSL-YOLO"?

Please git pull to make sure it is the latest version, and then execute **python3 main.py -t cfg/train_coco.cfg** by default.

Try setting batch_size to 2 ? This error is probably because os.listdir() failed to list the files in "dataset/coco/train/json".

HI, as mentioned in the readme, you need to write a program to convert your data set into the form of [x,y,w,h,confidence,class], if there is no special requirement, confidence will...

It’s not normal that an epoch takes 25 minutes (for 13000 images). The original "step_per_epoch=7327" was set for MS-COCO. You can calculate the new number yourself, "step_per_epoch=13000/batch_size", which should speed...

I use two 1080ti to train 110,000 images (step_per_epoch=7327). At 224x224, an epoch takes about 30~35 minutes, so it is normal and very fast for an epoch to take five...

Try changing the focal loss of line 388 in csl_yolo.py to the loss of line 389. I have found that sometimes the training is very unstable: **cnfd_loss=self._ConfidenceFocalLoss(pred_y,true_mask,ignore_mask,true_wht)** replace with **cnfd_loss=self._ConfidenceLoss(pred_y,true_mask,ignore_mask,true_wht)**...

1. 我原先也在Pascal VOC上面做,不過後來發現在COCO的AP嚴苛標準下與VOC的mAP非全然的正相關,但如果你受限於硬體問題,在VOC上測試也不失為一個好選擇,另外,五六個小時的實驗週期已然很短了,如果想進一步縮短試誤時間,可先將模型的輸入尺度縮小,例如從416縮至224,這個加速會十分顯著,也可採取更快的收斂策略,例如將SGD換成Adam,目的是減少整體的epochs,簡而言之,可以從縮小模型及減少epochs下手。 2. 這個理解不全然正確,FLOPs(每秒浮點數次數)是理論的速度指標,學術論文上相當常見,理論上良好的實作及環境可以在GPU及CPU體現出相對應的FPS,但是實務上經常不是如此,舉例來說我們都知道ReLU相對於Sigmoid更利於GPU加速,但是這兩者在FLOPs的數字上是無法區別的,GPU有CUDA Core的硬體實現方式也有CUDA框架的軟體邏輯問題,因此不同的實作及設備環境在同等FLOPs下仍然會表現出差異極大的FPS,至於為什麼CPU的差距較小?是因為CPU架構本身就難同GPU般大量的平行運算,也極少軟硬體針對CNN模型在CPU上的加速(可能有但不多),可以說我們在CPU跑模型通常都是裸奔狀態,所以在CPU上更容易測出與FLOPs成正比的FPS。 3. 我一部分想法如你所說沒錯,為彌補模型過小的問題採取更多尺度來增強他的性能,另一方面我也認為更細緻的sclae分佈能應對更多樣的物件尺寸,我想這個觀點是不限於小模型的。 4. 反覆試錯是肯定的,我只能跟你分享我一貫的方法,我會讀相關論文嘗試把他們提出的思路整合進模型然後試錯,有時後會靈光一閃想到較細節的問題,例如我論文提到的anchor約束方法,然後還是試錯,直到把有效的方案全部整合起來,其實並不聰明但能有效推進模型的改善,供你參考。

transformer中的attention使用了大量的sigmoid多少會拖慢速度,就算在CPU上都有影響,只是沒GPU顯著而已,不過如果純粹做理論模型,FLOPs降低仍然可以視作貢獻。