spatial transformer networks

encountered while reading “STN-OCR: A Single Neural Network for Text Detection and Text Recognition” which adopted spatial transformer networks.

This video is very clear in understanding how it works. Although I didn’t fully understand the interpolation equations, the other parts were clear. And at the end of the video, it briefly compares the spatial transformer with deformable convolutional networks which is interesting.



installation problems encountered when installing wiki.js

npm module error

When executing node wiki start it may call cannot find module xxxxx errors with EEXIST code.

The cause if two fold.

  1. NODE_PATH environment variable is not properly set
  2. the modules installed in node_modules directory are not properly installed.

For the NODE_PATH, the user can simply go do the node_modules directory inside the directory where the user installed wiki.js. And then export the NODE_PATH variable.

$ cd wiki_install_dir/node_modules
$ export NODE_PATH=$(pwd)

For the second part of the problem, the solution for me was to delete the node_modules directory entirely and reinstall it from the beginning.

$ cd wiki_install_dir
$ rm -rf node_modules
$ npm install

A few warning appeared but there weren’t any critical errors that interrupted the module installation process.
After these two operations, I did not encounter any “missing modules” error when running wiki.js

port problem

in dev mode and without a proxy server, using port 80 in linux will not be easy. By default it will be blocked and the user cannot see the wiki page from the browser even after executing node wiki restart. As another option, the user may configure it to work on another port for example 3000. The webpage will show up but the styling will not be applied since the url of the css files are pointing to port 80.

In order to solve this issue check out this page. I have followed the first solution since using port 80 is more convenient.

how to use TZe-CL6 tape

It was unexpectedly hard to find a simple guideline on how to use tze-CL6 cleaning tape.

Here is the response that I got from Brother.


Thank you for your email. I understand that you want to clean the print head of your PTP900W. I’ll be happy to help.
To clean your machine print head with the TZe-CL6 tape. You will need to install the tape cartridge, close the machine and press the (Feed&Cut) button. This will run the tape through the print head and will clean it.
If after following the previous instructions your machine is still having the same issue, it will require service. This model has a one year warranty from the manufacturing date or the purchase date. Please reply to this email with the following information in order to confirm the warranty:
•  Serial number for the Brother machine
•  Proof of purchase (i.e. receipt/invoice)

Thank you again for emailing us. If we can be of further assistance, please let us know. You may also contact us toll-free at 1-877-Brother (1-877-276-8437), Monday through Friday from 9AM – 9PM EST, excluding holidays. We are happy to help.

At Your Side,

dymo vs brother label printer comparison

While trying to setup a few of these label printers for a production line, I found a critical point that differentiates these two brands.

Since our company isn’t a big one and the production quantity isn’t as big as APPLE’s and it was my first time to setup up a production line with label printers, we wanted to minimize the cost of label printing infrastructure.

My idea was to utilize raspberry pis and a couple of cheap 7inch displays as the host to the label printers. This was because we wanted to log the product during the assembly line and update it to the central database and print a label for logging purposes on the spot. That’s why I need a simple display so that the worker can check if he logged it correctly with the barcode reader. In this scenario, it is important that the label printers can work with a raspberry pi in a linux environment.

I first bought the Dymo LabelWriter 450 and tested it with my laptop(Ubuntu) to initially see if it worked with a linux environment. Fortunately, Dymo provided a source code package that the user can compile and run. It worked perfectly, although I had to go through some trouble understanding the correct commands to print it the way I wanted.

Based on this success, I also bought a Brother label printer. Brother also provided a driver/cups program that will allow a linux user to use their printer labels.

However, one critical difference is that while DYMO provides the source code package so that a linux user of any architecture can utilize, Brother provides a prebuilt i386 architecture .deb package. Therefore, raspberry pi will not be able to work with the Brother label printer while it can with a DYMO printer.

To be precise, the source code package provided by DYMO also states the models that can work with the package. I’ve read it and it mainly says that this package will work with LabelWriter and LabelManager series. However, I’m not sure if it works will ‘all’ the series or not. For this, I recommend asking through the customer service.

For the Brother printer, there was a suggestion on the internet where one suggested a workaround of running the i386 deb package through a qemu emulation in the raspberry pi. However, considering the performance of the raspberry pi, this would be extremely slow. (Although I haven’t tested this out myself)


“QMYSQL driver not loaded” error

While using Qt, I faced the problem where I could not get the QMysql working. It will keep giving me the following error:

QSqlDatabase: QMYSQL driver not loaded

QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7


I checked out some threads that might give me a lead on solving this issue. I tried all the methods mentioned in this thread but none worked.

I found another lead, which was building the driver file from source and this is introduced in the official Qt resources. I will not write about how to download the source code of a given Qt version.

BTW, my environment is Ubuntu 14.04 (64bit) and have installed Qt5.7 and Qt5.8 through offline installer. Thus, I have /opt/Qt5.7 and /opt/Qt5.8.

Here I will log my attempt to follow the tutorial:

the guide says that the below are the commands that I must used to build the .so file that will allow me to work with mysql.

$ cd ~
$ cd Downloads/qt-everywhere-opensource-src-5.8.0/qtbase/src/plugins/sqldrivers/mysql
$ qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r"
$ make

However, I ran into a few errors here

error1) Qt 5.7 5.8 version mismatch

I went into the 5.8.0 version source and executed the qmake command. But it gave me an error like this:

$ qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r"
Project ERROR: Could not find feature framework.
Project ERROR: Could not find feature c++11.

I found that this error is probably due to the Qt version mismatch. As you can see below, the qmake tool is using Qt 5.7.0. One could make modifications so that the qmake tool will use Qt 5.8.0 but I simple decided to download the Qt 5.7.0 source package and run the sequence above.

$ qmake --version
QMake version 3.0
Using Qt version 5.7.0 in /opt/Qt5.7.0/5.7/gcc_64/lib



okay, now that I have changed to the Qt 5.7.0 source package, I hoped that the qmake .... command would work this time. However I ran into an error like below:

$ qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r"
$ make
make: Nothing to be done for `first'.

As you can see I have ran into an error in the make command. The reason behind this error was that I had already done this before writing this post and haven’t cleaned it. If you are doing this for the first time, then you probably won’t run into this problem.

This can be cleaned with

$ make clean
rm -f .moc/moc_qsql_mysql_p.cpp
rm -f .moc/main.moc
rm -f .obj/main.o .obj/qsql_mysql.o .obj/moc_qsql_mysql_p.o
rm -f *~ core *.core


now that we’ve clean the build, redoing the ‘make’ command should show proper building logs. And in the end, it will show a message something like below:


$ make


g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath,\$ORIGIN/../../lib -shared -o .obj/main.o .obj/qsql_mysql.o .obj/moc_qsql_mysql_p.o -L/usr/local/lib -L/usr/lib64/mysql -lmysqlclient_r -lz -lcrypt -lnsl -lm -lssl -lcrypto -L/opt/Qt5.7.0/5.7/gcc_64/lib -lQt5Sql -lQt5Core -lpthread 
mv -f ../../../../plugins/sqldrivers/

In the last line you can see that the built .so file has been moved to some other directory. Go to the directory and you will see the freshly built .so file. ( you don’t need to do this since you have once more step left in the original build directory)

$ cd ../../../../plugins/sqldrivers/


back to the build directory( sourcepackagedir/qtbase/src/plugins/sqldrivers/mysql) , the final is the make install command as introduced in the Qt official guide. However, you need to do this with sudo.

$ sudo make install
install -m 755 -p ../../../../plugins/sqldrivers/ /opt/Qt5.7.0/5.7/gcc_64/plugins/sqldrivers/
strip --strip-unneeded /opt/Qt5.7.0/5.7/gcc_64/plugins/sqldrivers/
install -m 644 -p /home/chadrick/Downloads/qt-everywhere-opensource-src-5.7.0/qtbase/lib/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake /opt/Qt5.7.0/5.7/gcc_64/lib/cmake/Qt5Sql/

as you can see, the built .so file will be moved to its appropriate location.


I think after this, you will not run into the QMYSQL driver not loaded error.



Raspberry Pi

Installed Ubuntu mate. The QMYSQL not found error can be solved by installing a package:

$ sudo apt install libqt5sql5-mysql