Git Product home page Git Product logo

yolov4-cloud-tutorial's People

Contributors

theaiguyscode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yolov4-cloud-tutorial's Issues

Only best weights and last weights are saved in drive folder?

Hi everyone,
I have been training a model with 6 classes for a max_batches=12000, in my drive I can't find the weights saved after every 1000 iterations, (for example 1000,2000,3000 ...), I can only find in my drive best.weights and final.weights.
How can I have the weights after every 1000 iterations? and what is best.weights, I know that final.weights is the weights updated after 100 iterations?

Thank you

mAP cannot be determined for yolov4

Hi , I want to determine mAP value ( using pre-trained weights and config file) for an image as well as for a video and below is the command I am using to do that .

!./darknet detector map cfg/coco.data cfg/yolov4.cfg /content/drive/My\ Drive/Colab\ Notebooks/yolov4.weights

However it throws out an error "Couldn't open file: data/train.txt" .Here I am NOT doing training .

PFA (coco.data) file
coco.zip

Can not save trained weights

I have followed all the steps and mounted the drive properly hence gdrive appears on the file manager tab. However, while training I have followed the mydrive/yolov4/backup in both obj.data and created the folders in the drive but the trained weights are not saved. If I load a weights file/pre trained weights it can load it properly and resume training but it does not save the weights after 100 iterations.

How many (classes of) objects can YOLO detect?

I have 850 different objects to detect and I am thinking using YOLO to solve this problem. but as you know default yolo algorithm works on 80 different objects.
has any one used yolo to detect objects which is number is more than 80? and how did it well?

Colab disconnects and all the files in the colab VM are lost

In case when the colab gets disconnected in the middle of the training, all the files in the VM are lost (such as the darknet folder). Does this mean that I will have to clone the darknet repo and upload all the other pre-requisite files (images, labels, etc) again to start the training?
If yes, would it be helpful to also backup the darknet folder with the gdrive (in addition to the weights file)?

Issue with training on multiple classes

Hey, I followed your video and tried to implement on multiple classes, but turns out after training also there was only one class in the weights that I downloaded. I have made all the changes that were explained in your video. Can you help me with the same?

how to pass file name in .darknet detect command

hi,

how do i pass file name in the below command instead of hardcoding the file name to read multiple images at once

!./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show -out result.json < /mydrive/images.txt

Instead of hardcoding this "/mydrive/images.txt" filename i want to pass it through code.images.txt may change. Please help me understanding this command

Stop while training "Buffered data was truncated after reaching the output size limit."

stop while training

error code :
truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Warning: in txt-labels class_id=-1 >= classes=4 in cfg-file. In txt-labels class_id should be [from 0 to 3]

truth.x = 0.958938, truth.y = 0.088214, truth.w = 0.084190, truth.h = 0.134353, class_id = -1

Buffered data was truncated after reaching the output size limit.

How can you use this model as deployment?

Hi @theAIGuysCode , when we run a Terminal code as ./darknet detect ................. and detect a saved image, it is all manually. With a Keras/Tensorflow/ PyTorch model, we can use Flask to serve on local system. I am asking is there any way to use this one (Not the Tensorflow one which you have) ? Can I convert this as Python code?

Transfer Learning: Train on Traffic Signs with pre-trained weights

I'm attempting to train my Yolo object detector using the Darknet CNN. I'm using Yolov4 pre-trained weights which as you showed can predict Cars, Traffic Lights, and Stop Signs with these COCO Classes. Just wondering how I can add an extra layer so my model can also pick up Traffic Signs. Code below to train:

!./darknet detector train data/obj.data cfg/yolov4-obj.cfg yolov4.conv.137 -dont_show -map

Extracting output ( absolute co-ordinates and bounding boxes) in json format

am using the following command in object detection
!./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights -ext_output -dont_show data/horses.jpg -out result.json
I get the following console output ,

data/horses.jpg: Predicted in 32.813000 milli-seconds.
horse: 77%	(left_x:   -1   top_y:  189   width:  157   height:  202)
horse: 98%	(left_x:    3   top_y:  188   width:  312   height:  224)
horse: 90%	(left_x:  249   top_y:  198   width:  171   height:  166)
horse: 86%	(left_x:  369   top_y:  210   width:   87   height:  113)
horse: 100%	(left_x:  432   top_y:  213   width:  163   height:  13
`5)

but the json file output is more as follows


[


{
 "frame_id":1, 
 "filename":"data/horses.jpg", 
 "objects": [ 
  {"class_id":17, "name":"horse", "relative_coordinates":{"center_x":0.664307, "center_y":0.547429, "width":0.210341, "height":0.263563}, "confidence":0.996012}, 
  {"class_id":17, "name":"horse", "relative_coordinates":{"center_x":0.205768, "center_y":0.585460, "width":0.404084, "height":0.437523}, "confidence":0.981816}, 
  {"class_id":17, "name":"horse", "relative_coordinates":{"center_x":0.433081, "center_y":0.548049, "width":0.221746, "height":0.324552}, "confidence":0.901274}, 
  {"class_id":17, "name":"horse", "relative_coordinates":{"center_x":0.533728, "center_y":0.519726, "width":0.112260, "height":0.220399}, "confidence":0.861711}, 
  {"class_id":17, "name":"horse", "relative_coordinates":{"center_x":0.100395, "center_y":0.566308, "width":0.203570, "height":0.393987}, "confidence":0.768916}
 ] 
}
]

Is there a way to get the absolute value of the co-ordinates ?

abnormal training with colab

FileNotFoundError: [Errno 2] No such file or directory: 'data/obj'

hi everyone i'm currently having a problem like this. when i try to run

!python generate_train.py
!python generate_test.py

Traceback (most recent call last):
File "generate_train.py", line 4, in
os.chdir(os.path.join("data", "obj"))
FileNotFoundError: [Errno 2] No such file or directory: 'data/obj'

how to solve this problem. eventho all my files name are correct.

After training, network cannot detect anything from the training set

I generated 3,000 synthetic images of rectangles (only one class, class="0"), along with 3,000 label files ("*.txt") that I think are appropriate. The training loss went from 11,000 down to 0.004 over about an hour. I let it go on another hour to 0.000025 loss. I figured I was vastly overtraining -- but I need to see this network do something -- anything. Unfortunately, it cannot detect anything from even my training set:

Loading weights from /mydrive/yolov4/backup/yolov4-obj_final.weights...
seen 64, trained: 32 K-images (0 Kilo-batches_64)
Done! Loaded 162 layers from weights-file

calculation mAP (mean average precision)...
Detection layer: 139 - type = 28
Detection layer: 150 - type = 28
Detection layer: 161 - type = 28
1000
detections_count = 0, unique_truth_count = 0
class_id = 0, name = Box, ap = 0.00% (TP = 0, FP = 0)

for conf_thresh = 0.25, precision = -nan, recall = -nan, F1-score = -nan
for conf_thresh = 0.25, TP = 0, FP = 0, FN = 0, average IoU = 0.00 %

IoU threshold = 50 %, used Area-Under-Curve for each unique Recall
mean average precision ([email protected]) = 0.000000, or 0.00 %
Total Detection Time: 38 Seconds

I assume now that the weights are being trained down to 0.000, but I thought the MISH activation was supposed to prevent this. Any words of wisdom? Are there any applications consistent with YoloV4 that can read an image file and label info and produce a picture with a drawn bounding box so that I know my annotation files are constructed properly? I have the x,y, w,h normalized between {0,1} with regards to the image width and height. Maybe my image SNR is too low (these are synthesized for very dark conditions)?

CUDA status Error

i facing a unknown error after run this command
!./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/person.jpg

ERROR
CUDA status Error: file: ./src/dark_cuda.c : () : line: 39 : build time: Jun 1 2020 - 01:52:37

CUDA Error: no CUDA-capable device is detected
CUDA Error: no CUDA-capable device is detected: Success
darknet: ./src/utils.c:326: error: Assertion 0' failed`
plz help to solve it

Pre-trained weights

Hi @theAIGuysCode, can I please get your License Plate Detector pretrained weights. I also need to train a License Plate Detector for different plates, and would need your weights for transfer learning to hasten up training

training for multiple object classes

In case of training for multiple custom objects, after preparing the labelled data and generating the txt files, should all the images and txt files be compressed in a single folder?

Remove output layer of trained Yolo

Hey there,

Thanks for the tutorial. I would like to first train the Yolo with large dataset relevant to my target class and then do transfer learning with with small dataset as the target class.

In the description, the yolov4.conv.137 which trained with coco dataset is given for doing transfer learning. Would U please help me, how can I remove the output layer of initial trained yolo of my own and get only yolo.conv weights like the given one?

Best

Wrong annotation Error

Hi,
I am getting an error:
Wrong annotation: class_id = 1. But class_id should be [from 0 to 0]

I have 1class and all txt files starts with 1.

Training Interruption without error or warning.

Hello!

Recently watched your video, started to do everything according to your guide, however training stage just finishes, no new weights config appear after that, I just start that block, it begins to work and then finishes and it's written done. I have no idea what does it mean, because I've already used this notebook to train traffic signs custon detector and everything worked brilliantly. Now I've tried to make custom planes detector, there're 2 classes there and this problem appeared.
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.