Unable to find scripts in darknet package where I can change file paths - darknet

I cloned this darknet package. When training:
./darknet detector train /home/philip/Downloads/YOLO/output.json /home/philip/darknet/cfg/yolov3_test.cfg /home/philip/obj_ws/src/darknet_ros/darknet_ros/yolo_network_config/weights/yolov3.weights -dont_show
I get:
train: Using default 'data/train.txt'
valid: Using default 'data/train.txt'
backup: Using default '/backup/'
at the onset of training.
At the end of training I get this error:
Couldn't open file: /backup//yolov3_test_final.weights
I have a backup folder with the weights. It seems to be a path directory probelm. For anyone who has used this package, I would appreciate help with:
[i]The name of the script I should be looking for to modify my path to fix my error.
[ii] Where to modify darknet so it has access to my OpenCV 3.20
[iii] where to change the default path of the train and valid parameters.
I've checked the folder and having a hard time finding the scripts I need to change.

Related

Training weka models in matlab: how to evaluate? Mssing some model type?

despite using weka I have models like libSVM and RseslibKnn, when I call them in Matlab it can't find them
enter image description here
and I noticed that actually they are not part of the models of the directories "classifiers".
enter image description here
I know how to crossvalidate a generic model but I can't use the simple validation with determinated training and test set. Here the code I'm using:
% memorize current folder and change folder
base_folder = cd;
cd 'C:\Program Files'
% adding weka in the java folder
javaaddpath("weka-3-8-4/weka.jar");
% loading arff training set
l = javaObject("weka.core.converters.ArffLoader");
l.setFile(javaObject("java.io.File","weka-3-8-4/data/weka_BEST_train_ESS.arff"));
tr = l.getDataSet;
tr.toString;
% building classfiers
c = javaObject("weka.classifiers.functions.MultilayerPerceptron");
tr.setClassIndex(tr.numAttributes - 1);
c.buildClassifier(tr);
c.toString;
% loading arff test set
l = javaObject("weka.core.converters.ArffLoader");
l.setFile(javaObject("java.io.File","weka-3-8-4/data/weka_BEST_test_ESS.arff"));
ts = l.getDataSet;
ts.toString;
% validation
e = javaObject("weka.classifiers.Evaluation", tr);
e.evaluateModel(c, ts); %?????????????????????????????????????????????????????????????????????
e.toSummaryString;
% going back to the current folder
cd (base_folder)
Answering to the first question:
libSVM and RseslibKnn are models available in separate Weka packages that need to be additionally installed in Weka. To install the packages run Weka package manager (menu Tools -> Package Manager in Weka GUI Chooser) and install LibSVM and Rseslib packages. The packages with their java jars are installed in the wekafiles directory. On Windows it is C:\Users\ <username>\wekafiles\packages by default.
I don't know Matlab but I guess that to use models from extra Weka packages you need to add also the package jar files to Matlab javapath after installing the packages in Weka:
javaaddpath("C:\Users\ <username>\wekafiles\packages\Rseslib\rseslib.jar");
javaaddpath("C:\Users\ <username>\wekafiles\packages\LibSVM\LibSVM.jar");
Alternatively, you can download the libraries directly from the web sites of the package providers, unpack them and add jars to Matlab javapath:
http://rseslib.mimuw.edu.pl/download.html
https://www.csie.ntu.edu.tw/~cjlin/libsvm/

Tessarect implementation JAVA

I'm trying to implement OCR recognition through Tessarect.
But at the moment I'm stuck with this error.
This is what I've done so far:
Homebrew tessarect
Download the API
Link the Jar with my project (build path > Configure build path > Add external Jar's
But when I compile my code this is the error
Error opening data file D:/Tess4J/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Warning: Invalid resolution 0 dpi. Using 70 instead.
I've downloaded the eng trained data and I've tried different stuff but I can't figure out how to solve this.
I'm running eclipse in macOS Catalina.
Thanks!
My situation
Set your datapath correctly.
Your location D:/Tess4J/tessdata/eng.traineddata is wrong

How to build Qtkeychain with Windows?

I'm trying to build my OwnCloud client. I'm using "Generic Build Instructions" from this link - https://doc.owncloud.org/desktop/2.5/building.html.
I'm stuck at 3 step with an error:
Could NOT find Qt5Keychain (missing: QTKEYCHAIN_LIBRARY)
I downloaded Qtkeychain and compiled it using this link - https://github.com/frankosterfeld/qtkeychain/wiki.
Everything is in my C disk. PATHS are set correctly. Can someone tell me what am missing here.
Adding PATH photo:
Adding a photo to be clear what am talking about:
How did you compile qtkeychain?
With the environment variable %QTDIR% set correctly, e.g. C:\Qt\Qt5.6.0\5.6\msvc2015, you should be able to compile qtkeychain
cmake -G "MinGW Makefiles" .
mingw32-make
and get a 32bit file named "libqt5keychain.dll.a".
You can then add the directory containing this file to your Windows path environment variable. This should work (it does for Nextcloud, at least).

SUN benchmark code Invalid .mex file error

I've downloadad the SUN benchmark code from MIT:
version 2:
http://people.csail.mit.edu/jxiao/SUN/source_code/
Once I download the 15 image dataset and run the function:
compute_features.m
I get an Invalid MEX file error:
Invalid MEX-file
'/home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64':
libcv.so.1: cannot open shared object file: No such file or directory
The file /home/arturo/Documents/Virality/reddit_data/SUN_source_code_v2/code/OpenCVmexWrapper/cvlib_mex.mexa64 actually does exist, so I'm thinking the problem hast to do with libcv.so.1, or the .mexa64 file is broken (which is very unlikely)
I read something about adding a path via LD_LIBRARY_PATH when I googled the error, but I'm not sure what path I should exactly add, at least temporarily. I have opencv installed along with its library, so I'm not sure what the problem is. My current system is Ubuntu 12.04 64bit.
There's a similar question here, but the answer says that for their specific case they have the source code of the MEX files posted, which is not the same fortune I have: running old mex file on new matlab releases
Found the answer. The key is to link explicitly to the folder the file 'libcv.so.1' is in just before running matlab.
so in the matlab folder:
LD_LIBRARY_PATH=/home/arturDocuments/Virality/reddit_data/SUN_source_code_v2/code/scene_sun ./matlab
And in matlab:
matlab>> compute_feature
Compling the source code in the other folders is also necessary.(vlfeat,VOC,libsvm). As well as editing the path in the function im2superpixels # GeometricContext_dhoiem from :
segcmd = '../segment_pedro/segment 0.8 100 100';
to:
segcmd = '/YOUR_PATH/SUN_source_code_v2/code/segment_pedro/segment/ 0.8 100 100';
*(The folder is one level above.)

DPAN to create local CPAN

I want to make a CPAN repository from all curently installed modules. So I used autobundle to get a list of installed modules.
I then used BackPAN::Index to download all the distributions into a directory and then ran dpan in it.
It chew them for quite some time and then failed
MyCPAN::App::DPAN::Indexer 1.28
Processing 2 distributions
One * = 1 distribution
# Extracting with ->_untar_at
# Extraction succeeded
+# Extracting with ->_untar_at
# Extraction succeeded
++
/home/ec2-user/dpan_test/modules/02packages.details.txt.gz-8496-trial has a problem and I have to abort:
Deleting file (unless you're debugging)
Some distributions in the repository do not show up in the file
/home/ec2-user/dpan_test/Moose-1.24.tar.gz
/home/ec2-user/dpan_test/Moose-Autobox-0.11.tar.gz at /usr/local/share/perl5/MyCPAN/App/DPAN/Reporter/Minimal.pm line 439
Some distributions in the repository do not show up in the file
and list of every distribution follows.
OTOH I have a success logged for every file in the indexer_reports.
Output from perl -V on this Pastie link
I suffered the same error it was resolved when I added:
organize_dists 1
Though when trying attempting to install from the mirror CPAN fails as no 01mailrc.txt.gz file can be found. This can be overcome by copying the file from say http://www.perl.org/CPAN/authors/01mailrc.txt.gz into the new mirror's authors directory
I got the same error message, but could fix it:
In my case, I put the tgz file directly in the root of my dpan directory. Moving "./dpan/DateTime-0.70.tar.gz" to "./dpan/authors/id/D/DR/DROLSKY/DateTime-0.70.tar.gz" did fix the problem. Now "02packages.details.txt.gz" and "03modlist.data.gz" get created.