Closed lidorshimoni closed 3 years ago
When you choose custom_weights
you should provide the custom weight in the dataset folder containing the images and labels
ex:
That's what I did
can you please send the output of the training shown in the cmd
here:
using yolo v4 version
2021-02-01 14:01:10,203 Events Log : INFO Creating custom trainings folder
2021-02-01 14:01:10,203 Events Log : INFO Checking if all data is valid
2021-02-01 14:01:10,262 Events Log : INFO Loading all images
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:22<00:00, 22.25s/it]
2021-02-01 14:01:32,516 Events Log : INFO Loading all labels
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:22<00:00, 22.59s/it]
2021-02-01 14:01:55,109 Events Log : INFO Creating your training folder
2021-02-01 14:01:55,110 Events Log : INFO Creating needed folders: weights and config
2021-02-01 14:01:55,111 Events Log : INFO Copying yolov4-tiny file to needed location
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 20.77it/s]
2021-02-01 14:01:55,161 Events Log : INFO train.txt and test.txt not found
2021-02-01 14:01:55,161 Events Log : INFO Creating train.txt and test.txt in needed location
2021-02-01 14:01:55,929 Events Log : INFO Choosing an image from test.txt for inference
2021-02-01 14:01:55,967 Events Log : INFO Creating .data file
2021-02-01 14:01:55,967 Events Log : INFO Creating .names file
2021-02-01 14:01:55,967 Events Log : INFO Modifying configuration file as needed
2021-02-01 14:01:55,969 Events Log : INFO Running web_ui on port 6007
2021-02-01 14:01:55,969 Events Log : INFO Running YOLO API on port 6009
2021-02-01 14:01:55,972 Events Log : INFO Running Tensorboard on port 6006
2021-02-01 14:01:55,974 Events Log : INFO Starting YOLO training
You can now monitor the training using any of the provided means or by viewing the logs saved in the custom training folder
@hadikoub
As shown in the output the custom weight is being copied and used.
2021-02-01 14:01:55,111 Events Log : INFO Copying yolov4-tiny file to needed location
the naming of the output weights is not related to the custom_weight
but related to the model_name
it's not the naming of the output weight. It's the file size.
the initial_weight is the size of a tiny weight file(24 MB) and all other files are much bigger and are normal yolo sized weights(256 MB)
if the tiny weight is being used then why its outputting normal/non-tiny weights?
@hadikoub
@hadikoub did you find any solution? or managed to reproduce the problem?
After I checked and tried to reproduce it, found no issue at all. The yolov4-tiny.weights are used as transfer learning weights but the repository still uses the yolov4.cfg, not yolov4-tiny.cfg. I tried to run a custom training using darknet repo with yolov4-tiny.weights and yolov4.cfg as provided in our training automation repository and the result where coherent the weights size are 245Mb
so how I do use your tool with yolov4-tiny.cfg? I want the final weights to be in yolov4-tiny format. ?
you need to replace yolov4.cfg
file content in ./config/darknet/yolov4_default_cfgs/yolov4.cfg
with the yolov4-tiny.cfg
contents and make sure that the name of the file is yolov4.cfg
and then rebuild the docker image while making sure to include --no-cache
in the end of docker build command
can I add multiple cfg files and choose one in the JSON file?
I want to compare cfg files, like yolov4-tiny-3l and more.
I tried making more cfg files and specify them in the model_name
field but i got an error
ConfigError: ('darknet', 'No such available framework')
modified part in JSON file:
"framework": "darknet",
"model_name": "my_yolov4",
"custom_weights": {
In the meantime, you can only specify one cfg file in ./config/darknet/yolov4_default_cfgs/
and use it.
ok, thanks a lot.
is it possible to train yolov4 tiny weights? I tried to train on yolo-tiny weights, specified their path in the JSON config file. like so:
but the output files were:
the initial weights are 24.3 Mb (tiny weights) and all others are 256 Mb (full wights). am I doing something wrong here?