mr7495 / Sperm_detection_and_tracking

Sperm detection and tracking methods from this paper: https://arxiv.org/abs/2002.04034
19 stars 10 forks source link

RetinaNet-testing-on-video(For counting).ipynb not working #3

Open ghost opened 3 years ago

ghost commented 3 years ago

I think it is sourcing from RetinaNet-testing-on-video(For counting).ipynb file because it is renaming different from sample_annotations.csv Traceback (most recent call last): File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 1001, in output = main() File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 977, in main anno=get_anno() File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 23, in get_anno if z is not None and int(row[0][-6:-4])<int(z[0][-6:-4]): ValueError: invalid literal for int() with base 10: '/0' My videos has 25 fps so i didn't change anything on csr-dcy. But when i set up it to same rename it gives error again Please help for work this code again.

ghost commented 3 years ago

Also i modified RetinaNet-testing-on-video(For counting).ipynb

(I edited these lines>> if ret is True:
count = count + 1 if (count==26) count=1 cv2.imwrite("{} {:02d}.jpg".format(save_path,count), frame) #write frame video_data.append("{} {:02d}.jpg".format(save_path,count)) #add the data to the list )

now result like this; Track way Detections are ZERO 0.0021581649780273438 Correct Tracks: 0 Wrong Tracks: 0 Missed Tracks: 0 Tracks Numbers: 0

mr7495 commented 3 years ago

Hello

I think you should make the CSV file like the template: for example, if the video name is "af_1.avi" the frame names shall be like af_1 01.jpg to af_1 25.jpg. (Refer to https://github.com/mr7495/Sperm_detection_and_tracking/blob/master/annotation%20sample.csv) If this does not solve the problem send me feedback. Thanks

ghost commented 3 years ago

But when video more than 1 seconds when 25 frames it gives error and not detects, also it detects wrong ways it not detects correct tracks, it detects only wrong tracks. Only detected 1 missed track. Please please immediately solve this problem turned I crazy about.

ghost commented 3 years ago

I tried with your sample annotations it detects 2 way also when i try with my annotations from RetinaNet-testing-on-video(For counting).ipynb file it detects only 47 wrong ways not detects correct ways but when RetinaNet-testing-on-video(For counting).ipynb extracts any csv it is different from the sample annotations. Please Fix RetinaNet-testing-on-video(For counting).ipynb file I will add some pics about differences. Photo1 Photo2

mr7495 commented 3 years ago

Hello sorry for answering late. I do not understand what is your problem. You must just change the name of the saved images in the CSV data from 0.jpg to af_1 01.jpg. Did you try doing this?

ghost commented 3 years ago

I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>…

But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame)

yuxixixi-7 commented 3 years ago

I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame)

Hello, have you solved this problem? What format should the CSV file be changed to?

ghost commented 3 years ago

No, i wrotten own code about detection but sadly this is private, because i used in my company project. This ones format is so mixed. I can't solved this problem.

22 Eyl 2021 Çar 05:53 tarihinde yuxixixi-7 @.***> şunu yazdı:

I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame)

Hello, have you solved this problem? What format should the CSV file be changed to?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mr7495/Sperm_detection_and_tracking/issues/3#issuecomment-924539157, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUV3KZ657QVDOMILW2I6GLUDFALLANCNFSM4WKLVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

yuxixixi-7 commented 3 years ago

No, i wrotten own code about detection but sadly this is private, because i used in my company project. This ones format is so mixed. I can't solved this problem. 22 Eyl 2021 Çar 05:53 tarihinde yuxixixi-7 @.***> şunu yazdı: I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame) Hello, have you solved this problem? What format should the CSV file be changed to? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUV3KZ657QVDOMILW2I6GLUDFALLANCNFSM4WKLVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Thank you for your reply. I corrected the format according to what the author said, but the result is still as follows: Correct Tracks: 0 Wrong Tracks: 0 Missed Tracks: 0 Tracks Numbers: 0

yuxixixi-7 commented 3 years ago

No, i wrotten own code about detection but sadly this is private, because i used in my company project. This ones format is so mixed. I can't solved this problem. 22 Eyl 2021 Çar 05:53 tarihinde yuxixixi-7 @.***> şunu yazdı: I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame) Hello, have you solved this problem? What format should the CSV file be changed to? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUV3KZ657QVDOMILW2I6GLUDFALLANCNFSM4WKLVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hello, I’m sorry I want to ask, is there a problem with the RetinaNet-testing-on-video(For counting) file or the modified_csr-dcf file? If you rewrite, which part should be written? The detection part or the tracker part? Thank you very much, I hope you can give me some suggestions.

yuxixixi-7 commented 3 years ago

I think it is sourcing from RetinaNet-testing-on-video(For counting).ipynb file because it is renaming different from sample_annotations.csv Traceback (most recent call last): File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 1001, in output = main() File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 977, in main anno=get_anno() File "/content/Sperm_detection_and_tracking/modified_csr-dcf.py", line 23, in get_anno if z is not None and int(row[0][-6:-4])<int(z[0][-6:-4]): ValueError: invalid literal for int() with base 10: '/0' My videos has 25 fps so i didn't change anything on csr-dcy. But when i set up it to same rename it gives error again Please help for work this code again.

No, i wrotten own code about detection but sadly this is private, because i used in my company project. This ones format is so mixed. I can't solved this problem. 22 Eyl 2021 Çar 05:53 tarihinde yuxixixi-7 @.***> şunu yazdı: I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame) Hello, have you solved this problem? What format should the CSV file be changed to? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUV3KZ657QVDOMILW2I6GLUDFALLANCNFSM4WKLVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

No, i wrotten own code about detection but sadly this is private, because i used in my company project. This ones format is so mixed. I can't solved this problem. 22 Eyl 2021 Çar 05:53 tarihinde yuxixixi-7 @.***> şunu yazdı: I tried but if you will try on the colab it is not working because if it detects only one sperm in each frame it will Works cmpletely but when it will detects multi sperms in each frame it will detects only wrong ways because it collects each line with sort so from this reason it detects only one sperms in each frame. So your sort in your sample annotation af01 01.jpg(first sperm location in first frame)>>af01 02.jpg(first sperm location in second frame)>>af01 03.jpg (first sperm location in third frame)>… But when i run code for csv writing, it sorts 01,02,03…. So i edited and now it gives like this result but it is not gives result it gives always Wrong ways output from modified csr file. af 01 01.jpg(first sperm location in first frame)>af01 01.jpg (second sperm location in first frame)….after 25frames all of sperms…>> af 02 01.jpg(first sperm location in second frame)>af02 01.jpg (second sperm location in second frame) Hello, have you solved this problem? What format should the CSV file be changed to? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANUV3KZ657QVDOMILW2I6GLUDFALLANCNFSM4WKLVEXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hello, I’m sorry I want to ask, is there a problem with the RetinaNet-testing-on-video(For counting) file or the modified_csr-dcf file? If you rewrite, which part should be written? The detection part or the tracker part? Thank you very much, I hope you can give me some suggestions.Please please immediately solve this problem turned I crazy about.