Open Mps24-7uk opened 5 years ago
do you use GPU=1 in your Makefile ?
You have to use exact path, for example /home/jesuisthanos/darknet/.... Relative paths like yours won't work. Change them
@jesuisthanos i use the exact path and i get this error
Be careful when you save the file, it should be utf-8. It's really easy to face this problem on Windows due to file saving, unlike Linux
@jesuisthanos so what should I do ?
@jesuisthanos
Can you show me your Save As dialog box?
@jesuisthanos I'm also dealing the same problem (cannot load image "*****.txt") an mention it that we should save the file as UTF8 format, do you mean train.txt by that ??
I had a similar problem: https://github.com/AlexeyAB/Yolo_mark/issues/132
@jesuisthanos I am getting the following error.It was working well in a windows machine but when I tried to run on Google colab which is a linux machine I got errors.Any help???
I solved this issue by converting the txt files which were created in windows to unix like using the following script which I found here https://stackoverflow.com/questions/36422107/how-to-convert-crlf-to-lf-on-a-windows-machine-in-python
Code:
WINDOWS_LINE_ENDING = b'\r\n' UNIX_LINE_ENDING = b'\n'
sou=r"/content/darknet/cfg/my-yolo2.cfg" file_path = sou
with open(file_path, 'rb') as open_file: content = open_file.read()
content = content.replace(WINDOWS_LINE_ENDING, UNIX_LINE_ENDING)
with open(file_path, 'wb') as open_file: open_file.write(content)
Same here; the solution proposed by @shivu1998 did not work for me.
My Software Stack:
OS: Windows 10 Version 1809 (64-bit)
Python: 3.7.3
torch: 1.1.0
In google colab, PATH is different from PC environment, so PATH is required in your drive.
You can check with pwd. In train.txt and test.txt, (/ content / drive / [your PATH] ... / ~ .jpg or .png) and you need to rewrite.
ex) train.txt /content/drive/.../~0.jpg /content/drive/.../~1.jpg ...
Can you show me your Save As dialog box?
thanks, simply by save as..., select unicode, and replace. then it works
Below code worked for me, i have converted the windows train.txt file to Linux file format and i can run the model after that. Thanks to shivu1998
WINDOWS_LINE_ENDING = b'\r\n' UNIX_LINE_ENDING = b'\n'
file_path = r"C:\Users\rkamat\Desktop\YOLO\2\yolo-custom-object-detector-master\python\train.txt"
with open(file_path, 'rb') as open_file: content = open_file.read()
content = content.replace(WINDOWS_LINE_ENDING, UNIX_LINE_ENDING)
with open(file_path, 'wb') as open_file: open_file.write(content)
to linux format
dos2unix train.txt
dos2unix val.txt
Hi, I don't think its with line endings only. I am using Ubuntu. I checked the encoding as UTF8. Still I get the same error. Most importantly not the same image file creating error everytime. Each time its a different image file being reported. Thanks
@arnabseacom I have the same issue, were you able to solve it?
Cannot load image “./darknet/dataset/z115.jpg” STB Reason: can't fopen
The darknet directory contains the following:
dataset directory: It includes all the annotated data.
obj.data file: It contains
obj.names file: It contains
train.txt file: It contains train
When I am runing this command: ./darknet detector train obj.data yolov3-tiny.cfg darknet53.conv.74
The Error is generated: Cannot load image "./darknet/dataset/z115.jpg" STB Reason: can't fopen
The images are present in the dataset but not open.
Please me help with this @antnh6 @sachindesh @TheMikeyR @pjryan513 @BasketJace @jesuisthanos @futureZG @Fnajjar @kylynf @PeterQuinn925 @ahsan856jalal @romass12 @zboinek @BasketJace @Broham