darknet
darknet copied to clipboard
Can't open label file. (This can be normal only if you use MSCOCO)
Hi folks, I am trying to run darknet on a linux based super computer. The system has a large number of Nvidia GPUs and I wanted to leverage that. Since I have limited access to the system as one of the many users, I have to submit jobs to its GpuQ (GPU queue) through a slurm script. And when I run darknet, it works well at times. But at times it gives the following error:
Can't open label file. (This can be normal only if you use MSCOCO)
On the same system, I ran darknet as a batch job (i.e. without using GPU queue through slurm) and darknet worked fine. I wonder if someone will like to offer any help on this issue please!
AlexAB fork (https://github.com/AlexeyAB/darknet) probably expect annotations (labels) in the tame directory where images are.
Hi folks, I am trying to run darknet on a linux based super computer. The system has a large number of Nvidia GPUs and I wanted to leverage that. Since I have limited access to the system as one of the many users, I have to submit jobs to its GpuQ (GPU queue) through a slurm script. And when I run darknet, it works well at times. But at times it gives the following error:
Can't open label file. (This can be normal only if you use MSCOCO)
On the same system, I ran darknet as a batch job (i.e. without using GPU queue through slurm) and darknet worked fine. I wonder if someone will like to offer any help on this issue please!
Hi adilraja
I encountered the same question as you, I wonder wether you have solve this problem?
The problem can usually be solved with checking your train.txt and test.txt or directories for incorrect or misspelled endings. In my case it was "../data/obj/Download.xml.txt" instead of the usual "../data/obj/Download.txt".
I'm having the same issue while training. Please note that I'm using the chest x-ray images as my data set. All the images and labels are stored in the same directory: /darknet/data/obj
Copying all the *.txt labels into the same folder as the images solved the problem for me.
-
the reason you got this issue is that you miss some txt labels file in the path
darknet/data/obj
For example, you included 0001.txt indarknet/data/train.txt
, but 0001.txt doesn't' exist in the folderdarknet/data/obj
-
why it can be normal in MSCOCO? because COCO 2017 train dataset have 1021 images which have no annotations
-
how to deal with this issue make sure the txt file in
darknet/data/train.txt
is equivalent to the folderdarknet/data/obj
I had the same problem because I somehow removed the put txt-files in the directory and forgot to put them back. Silly of me. Just in case of someone like me behave like an idiot sometimes😥
For me, I had renamed my label files differently to the images. The label filenames must match the image filenames exactly (except for the extension).
the reason you got this issue is that you miss some txt labels file in the path
darknet/data/obj
For example, you included 0001.txt indarknet/data/train.txt
, but 0001.txt doesn't' exist in the folderdarknet/data/obj
why it can be normal in MSCOCO? because COCO 2017 train dataset have 1021 images which have no annotations
how to deal with this issue make sure the txt file in
darknet/data/train.txt
is equivalent to the folderdarknet/data/obj
is it compulsory to have label files in train.txt too. i have them in data/obj. Also training has begun but it still prints "cant open file" a few times in between
Copying all the *.txt labels into the same folder as the images solved the problem for me.
Hi, I've encountered the same problem when I trained my models. May I ask, if my dataset was in aic_hcmc2020 then inside it I got an images folder storing all the images files and labels folder storing all the labels files, then based on your recommendation, I should have stored all the images and labels inside one folder inside the aic_hcmc2020, example like data?