Author Archives: Robin Dong

The weird comparison behaviours of Python string

A part of my code didn’t work well, as below:

It will not print out anything totally. So I directly printed out the actually value of mapping[‘colour’]:

Why ‘Red’ is not ‘Red’? After changed the judgement from ‘is’ to ‘==’, the result became correct. The key is that… Read more »

Investigating about Streaming ETL solutions

Normal ETL solutions need to deliver all data from transactional databases to data warehouse. For instance, DBAs or Data Scientists usually deploy a script to export whole table from database to data warehouse each hour. To accelerate this process, we decided to use Streaming ETL solution in AWS(or GCP, if… Read more »

Tips about Numpy and PyTorch

1. Type convertion in Numpy Here is my code:

Guess what? The type of variable ‘c’ is ‘float64’! Seems Numpy automatically considers a empty array of Python as ‘float64’ type. So the correct code should be:

This time, the type of ‘c’ is ‘int64’ 2. Convert a tensor… Read more »

Using Single Shot Detection to detect birds (Episode three)

In the previous article, I reached mAP 0.740 for VOC2007 test. After one month, I found out that the key to boost the performance of object detction is not only based on cutting edge model, but also depends on sophisticated augmentation methodology. Therefore I manually checked every image generated by… Read more »

Some tips for opencv-python

      No Comments on Some tips for opencv-python

Type conversion Using opencv-python to add object-detection rectangle for the image:

The result looks like this But in a more complicated program, I processed a image from float32 type. Therefore the code looks like:

But this time, the rectangle disappeared. The reason is opencv-python use numpy array for… Read more »

Get the type of engine for a table in MySQL

To view show the type of engine a MySQL table used, we could type:

Although the command is simple, the output is too much. We could also use a slightly more complicated command to output briefly:

Use docker as normal user

      No Comments on Use docker as normal user

I have used docker for more than 4 years, although not in product environment. Until last week, my colleague told that docker can be used as non-root user. The document is here. I just need to

So easy.

Using Single Shot Detection to detect birds (Episode two)

In the previous article, I reached mAP 0.739 for VOC2007. After about two weeks, I add more tricks to reach mAP 0.740. The most important trick is escalating the expand-scale of augmentation which is made from this patch. Increase the scale range could help the model to detect a smaller… Read more »

Debugging the problem of ‘nan’ value in training

Previously, I was using CUB-200 dataset to train my object detection model. But after I used CUB-200-2011 dataset instead, the training loss became ‘nan’.

I tried to reduce the learning rate, change optimizer from SGD to Adam, and use different types of initializer for parameters. None of these solved… Read more »

Using Single Shot Detection to detect birds (Episode one)

SSD (Single Shot Detection) is a type of one-stage object detection neural network which uses multi-scale feature maps for detecting. I forked the code from ssd.pytorch, and added some small modifications for my bird-detection task. I have tried some different types of rectifier function at first, such as ELU and… Read more »