darknet
darknet copied to clipboard
couldn't open file: train.txt
although the absolute and relative locations for train.txt file was defined in obj.data the darknet detector train command couldn't open it. if obj.data is not provided as argument it looks for the /data/train.list as default. if i save my train.txt into /data as train.list the training starts and wants to save to default folder /backup//yolo.backup if i create a backup folder manually but it didn't work..
Can someone help me what the problem is ? re-build make clean did not work i am on linux. But everything works in Windows os.
Ok build this and it runs good..... cheers https://github.com/pengdada/darknet-win-linux
If you want a more updated / optimised darknet go for https://github.com/AlexeyAB/darknet/
I met the same problem.too Can you tell more details about how to solve this problem ? Thanks @anandkoirala @TheMikeyR
AlexeyAB darknet is always maintained and works...
@anandkoirala
The first thing you should check is that you have permission to edit/read the files necessary.
Changing the files to include the absolute path worked on for me on a Mac. However, it did not solve the issue on Windows.
On Windows, I was running into the same error and the issue turned out to be the end of line sequences. Make sure that the end of line sequences are "/n" and not "/r/n". In a text editor (like visual studio code) make sure you have LF and not CRLF and also that the file format is UTF8.
Side Note: I also switched to this version of dark net https://github.com/pengdada/darknet-win-linux as it worked better on Linux.
I also face the same problem and get solved after making efforts for two hours. You can follow the following steps to resolve this issue.
01-Open the "train.txt" file and note the directory assigned to each image.
02-Open the " obj.txt" file and assign the same directory as you noted above to "train", "Valid", and names.
03-The "train.txt", "test.txt" and "obj.txt" should be in the same directory as assigned above.
Stay Blessed!
I am working on Unbuntu and I also got this problem. I've use dos2unix to change me .txt and also use abs path for this files. Also I move these files all to dir /data/. But it still gives me "Couldn't open file: /xxx/xxx/train.txt/" TAT
@zhuchenxv try to dos2unix your config file
Loading weights from darknet53.conv.74...Done! Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Couldn't open file: /content/darknet/train.txt plesea, help me, I spent a lot of time for it
@zhuchenxv try to dos2unix your config file
that worked thank you very much. I just dos2unix'ed the "X.names" and "X.data" file and it worked.
Loading weights from darknet53.conv.74...Done! Learning Rate: 0.001, Momentum: 0.9, Decay: 0.0005 Couldn't open file: /content/darknet/train.txt plesea, help me, I spent a lot of time for it
@snadgauda
same problem on macOS tried dos2unix
It’s not required for macOS since it’s already built on Linux. Check for your path and any extra spaces . Names the files .data and .names . That solved the problem for friend using macOS. On Mon, May 4, 2020 at 11:31 AM Hamid [email protected] wrote:
same problem on macOS tried dos2unix
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/484#issuecomment-623534256, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALKV2FY343EYUC7XANG2BALRP3NTNANCNFSM4ER32RNA .
@zhuchenxv try to dos2unix your config file
that worked thank you very much. I just dos2unix'ed the "X.names" and "X.data" file and it worked.
that helps, thanks alot
How do i fix this error...
when I run the command create_list_of_images.py after running there is not any data in the train.txt file
Just give the proper location of obj.data, in my case "./darknet detector calc_anchors obj.data -num_of_clusters 9 -width 416 -height 416". I t works and anchors.txt and counters_per_class.txt will be saved.
I fixed this error by looking here: https://github.com/pjreddie/darknet/issues/2437
Please check the type of Enter in".data","train.txt" files. If you also use VSCODE, you can find type is "UTF-8 LF" or "UTF-8 CRLF" on right bottom. I use Linux to train, but the ".data" file is generated by Windows and uploaded to linux. when i change ".data" file from "UTF-8 CRLF" to "UTF-8 LF" it works.
已收到邮件,谢谢