YOLOv4 (Windows) - No bounding box around the prediction - object-detection

I followed the steps provided in the following link Setup however the results were not as expected. Result
The command used after installing darknet.exe detect cfg/yolov4.cfg yolov4.weights data/dog.jpg

Related

Yolov2 Compiling and Training: Problems on Windows 10

I have been having issues setting up Darknet. I will be using yolov2 to detect cerebral microbleeds for a neuroscience project. After battling Darknet for a few days, I managed to install it and successfully download the train, test and validation Pascal VOC data by using the below general configuration/set up:
Cmake-GUI 3.2 (binary distributions, not source)
MSVS 2019
CUDA 11.1
cuDNN 8.0.5
OpenCV 4.2.0
I always get an error when running darknet.exe detector train data/voc.data yolo-voc.2.0.cfg darknet19_448.conv.23 in cmd:
'darknet.exe' is not recognized as an internal or external command,
operable program or batch file
I cannot seem to understand the reason why.
In addition, when following the pjreddie instructions to modify cfg for Pascal Data:
classes= 20
train = /train.txt
valid = 2007_test.txt
names = data/voc.names
backup = backup
I change the Notepad file and all / to backslash, does that make a difference?
Could anyone shed some light as to how to successfully train the data?
that's a generic error when you are trying to execute a program that is not in your current directory or not defined in PATH variable.
try adding the path to the darknet.exe file in your path variable:
\darknet\build\darknet\x64\

How do I view Mozilla TTS training performance in Tensorboard?

A lot of the documentation for Mozilla TTS mentions examining graphs in Tensorboard or posting Tensorboard graphs to the forums. How do I do this?
From within your local copy of the mozilla-tts project, run:
./bin/tensorboard --logdir path/to/your/run-output/directory
... where path/to/your/run-output/directory is the path to the run output directory. The path is a combination of what's in the output_path setting in your config.json file, coupled with the type of model, and date and time training started. During training, Mozilla TTS writes an ever-increasing tfevents file into the folder -- this is the file Tensorboard reads.
For example, my run output directory path is /home/guy/moz-tts/Models/test/test-ddc-March-07-2021_11+23AM-547bfc4 so the command I run is:
./bin/tensorboard --logdir /home/guy/moz-tts/Models/test/test-ddc-March-07-2021_11+23AM-547bfc4
After running the command, you can view your Tensorboard graphs at http://localhost:6006/. You can run Tensorboard multiple times; each instance gets assigned a unique port number (6007, 6008, 6009, etc.)

Gcloud ai-platform local predict Error: gcloud crashed (PermissionError): [WinError 5] Access is denied

I was trying to run a command to test local predict in my computer. However, the command failed every time with this error.
ERROR: gcloud crashed (PermissionError): [WinError 5] Access is denied
This is the command:
gcloud ai-platform local predict --model-dir model_final --json-instances image_b64.json --framework tensorflow
I am positive 101% positive that I have followed everything in the doc by Google.
First, the command required a model file to be saved in TensorFlow SavedModel format, which, since I use Keras, I can just do model.save("model_final").
If you have used Keras for training, use tf.keras.Model.save to export a SavedModel
So I did, at it only output a single file, so I can only assume it's the file to be placed in the --model-dir parameter. I admit doing model.save("model_final") created a file, not a dir, which is a bit weird but the document for Keras just said use that so there is no way I could be wrong.
And also:
If you export your SavedModel using tf.keras.Model.save, then you do not need to specify a serving input function.
If you export a SavedModel from tf.keras or from a TensorFlow estimator, the exported graph is ready for serving by default.
The "image_b64.json" file follows this format:
{"image_bytes":{"b64": base64_jpeg_data )}}
So after 3 hours and having followed everything required by Google, and somehow the gloud still throws me that error. And, yes, of course I have run the command line under Administrator Mode. I also tried it in two of my computers, and I got the same error. I am using Windows, Tensorflow 1.15.
Can anyone point out what is the problem with my implementation, or Google Doc/Keras is just lack lustering. Thank you.

tensorboard: cannot open subgraph

Recently I wrote a my custom operator (and its gradient) in python following this post
Tensorflow: Custom operation used in two networks simultaneously produces nan
Tensorflow runs with no error and the prediction gives expected accuracy. However, when I want to visualize this graph with tensorboard. I find that I cannot open the subgraph to see its structures. But it's gradient subgraph can be opened and seen. Does anyone has some idea about this problem?
Fig.1: subgraph fc1 cannot be opened but gradient/fc1 can be opened.
I can open the fc1 metanode on TensorBoard 0.1.8.
What version of TensorBoard you are using? You can find the version via running
python -c 'from tensorboard import version; print(version.VERSION)'
After that, could you try upgrading tensorboard via
pip install --upgrade tensorflow-tensorboard
and let me know if the issue persists?

Tensorflow Tensorboard on Windows shows a blank page

I'm using Tensorflow on Windows but when I try to launch Tensorboard opening http://localhost:6006 the browser shows a blank page
I have added the codeline
writer = tf.train.SummaryWriter('mypath/my_graph', sess.graph)
to my Tensorflow model and launched tensorboard with
tensorboard --logdir="mypath/my_graph"
Here the console output:
Following mrry suggestion I have updated to 0.12.0rc1 and now the Tensorboard page is shown but unfortunately I cannot see any graph, and is missing also the left panel to upload a graph file manually that I can see in some screenshots of the official guide.
Tried also to use
writer = tf.summary.FileWriter('mypath/my_graph', sess.graph)
following the deprecation hint
EDIT
I have found the problem. If I launch tensorboard --logdir="mypath/my_graph" TensorBoard is unable to load the path and looks always for the graph files in the default user path C:\Users\andrew\mygraph\ if I run console as user or C:\Windows\System32 if I run console as administrator. This is a bug and should be fixed.
The 0.12.0rc0 (Release Candidate 0) release of TensorFlow on Windows contains a broken version of TensorBoard. We recently made a new release (0.12.0rc1, Release Candidate 1) that contains a fix for TensorBoard on Windows. You can upgrade by following the instructions for installing the latest release on Windows, or simply typing pip install --upgrade tensorflow at the command prompt.
In ubuntu we can use:
tensorboard --logdir=/home/user/graph/
In Windows we have to change the command prompt to the directory in which the graph file is placed and then use:
tensorboard --logdir=\home\user\graph\