Machine Learning

The basis of CNN architectures

DenseNet (Huang et al, CVPR 2017)

 

 

Advertisements
Quick Notes

Fixing login loop issues / low resolution graphics mode (Ubuntu 14.04) after installing CUDA drivers.

Try one of these ways, or all:

# To uninstall nvidia drivers completely

sudo apt-get remove –purge nvidia*

sudo apt-get remove –purge cuda*

sudo apt-get remove –purge nvidia-current*  (if you installed it)

sudo apt-get remove –purge cuda-*

sudo apt-get autoremove

sudo nvidia-uninstall

# Remove blacklist during installing NVIDIA driver

sudo rm /etc/modprobe.d/blacklist-nouveau.conf

# To reinstall xserver:

sudo apt-get install –reinstall xserver-xorg-video-nouveau libgl1-mesa-glx

# Remove /etc/X11/xorg.conf and restart lightdm

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bk

sudo service lightdm restart

Quick Notes

Install Chrome Remote Desktop[Ubuntu]

Install dependencies:

sudo apt-get install xvfb python-psutil

Download and install package: chrome-remote-desktop_current_amd64.deb

sudo dpkg -i chrome-remote-desktop_current_amd64.deb

Use it:

  1. Open Chrome.
  2. Type: chome://apps
  3. Choose Chrome Remote Desktop.

Notice: to prevent the memory consumption, remove deja-dup (a program to backup data on ubuntu).

== // ==

To fix the problem of showing only wallaper, following [3].

Stop it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop –stop

Back it up:
cp /opt/google/chrome-remote-desktop/chrome-remote-desktop /opt/google/chrome-remote-desktop/chrome-remote-desktop.orig

Edit:  /opt/google/chrome-remote-desktop/chrome-remote-desktop

Change this to the size I wanted.
DEFAULT_SIZES = “1920×1080”

Change this to desktop zero which is the console.
FIRST_X_DISPLAY_NUMBER = 0

Comment this out so it doesn’t increment for a new desktop.:
#while os.path.exists(X_LOCK_FILE_TEMPLATE % display):
#  display += 1

Comment this out so that it doesn’t attempt to start a new display session since the console on desktop zero is already running :
#logging .info(“Starting %s on display :%d” % (xvfb, display))
#screen_option = “%dx%dx24” % (max_width, max_height)
#self .x_proc = subprocess.Popen(
#    [xvfb, “:%d” % display,
#     “-auth”, x_auth_file,
#     “-nolisten”, “tcp”,
#     “-noreset”,
#     “-screen”, “0”, screen_option
#    ] + extra_x_args)
#if not self.x_proc.pid:
#  raise Exception(“Could not start Xvfb.”)

Edit `launch_session`:

def launch_session(self, x_args):
    self._init_child_env()
    self._setup_pulseaudio()
    self._setup_gnubby()
    #self._launch_x_server(x_args)
    #self._launch_x_session()
    display = self.get_unused_display_number()
    self.child_env["DISPLAY"] = ":%d" % display

Start it:
/opt/google/chrome-remote-desktop/chrome-remote-desktop –start

== // ==

References:

[1] https://www.howtoforge.com/how-to-install-and-use-the-chrome-remote-sharing-feature-in-ubuntu

[2] https://support.google.com/chrome/answer/1649523?hl=en

[3] https://productforums.google.com/forum/#!topic/chrome/LJgIh-IJ9Lk

Quick Notes

Qualcomm Atheros wireless card not supported on Ubuntu

If the firmware file directory doesn’t exist, create it:
sudo mkdir -p /lib/firmware/ath10k/QCA6174/hw3.0/

sudo wget https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/board-2.bin?raw=true /lib/firmware/ath10k/QCA6174/hw3.0/board.bin

sudo wget https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1?raw=true /lib/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin

Remember to rename to `board.bin` to workable on Ubuntu.

Computer Vision · Image based Localization

[Understand papers] #1 – Improving Image-based Localization by Active Correspondence Search

Problem: This paper addresses the problem of finding position and orientation from which a given picture was taken.

Approach: Given a database of scene images, using Structure from Motion (SfM) to reconstruct 3D point cloud of the scene, and finding correspondences between 2D image features and a large number of 3D scene points to estimate the full camera pose, i.e. position and orientation. The main problem to solve: find correct correspondences between 2D features and 3D points (accuracy and time efficiency).

Contribution: Combining 2D to 3D and 3D to 2D matching methods and considering the visibility filtering step to balance additional effort of active search.

Method (step-by-step)

  • Building a visual word vocabulary of SIFT descriptors (100k in implementation) and build a vocabulary tree on top of it.
  • All 3D points are assigned to visual words in an offline stage. A point stored in a word by mean of all of its descriptors assigned to this word (entries of mean are rounded to the nearest integer values for memory efficiency).
  • Building a kd-tree from 3D points to fast determine 3D nearest neighbors for 3D-2D matching.
  • Given a query  image, its SIFT descriptors are again mapped to the vocabulary –> to result a list of candidate points of every feature and the features are considered in ascending order of length of their lists as a prioritization scheme (coded PS). For every feature f, search through all points in its word and find to nearest neighbors, and a correspondence is established if the SIFT ratio test is passed. (the 2D-3D matching).
  • Once a 2D-3D correspondence between feature f and a point p has been found. Searching 3D points closest in space to p. Every such point p’ , we assign 3D points to find closest 2D features with descriptors similar to p’ using a visual vocabulary (coarser level) which indicated as its predicted search cost. This point p’ is inserted into the prioritization scheme PS by using its search costs.  Now, the PS have prioritized points/feature to be searched for 2D-3D or 3D-2D matching (see detail in original paper). Note that the 2D-3D matching requires a rather fine vocabulary to limit the search space, while the 2D-3D matching needs a coarser vocabulary (lower level of the same vocabulary tree) to guarantee enough features are considered.
  • It is noteworthy that a filtering step via point visibility is used to remove 3D points in close space before matching 3D-2D. i) A minimum set of cameras, which closest whos viewing direction differs from one image by at most 60 degree, is selected. ii) Keep only 3D points visible to this subset and then again pick only points two edges away from point p for 3D-2D matching.
  • Stop when enough correspondences have been found (N= 200 in implementation).
  • The camera pose is estimated by a RANSAC-variant using 6-point DLT algorithm.

Key comments:

  • 3D-2D matching is time efficiency vs 2D-3D matching leads higher-quality matches.
Quick Notes

Import Office 365 email to gmail

Server name: smtp.office365.com
Port: 587
Encryption method: TLS

Most of cases, you can not use this SMTP server to import your office 365 account to gmail. To get the correct SMTP, you should ping from your computer like this:

$ ping smtp.office365.com
PING outlook-apacnorth.office365.com (132.245.160.34) 56(84) bytes of data.
64 bytes from 132.245.160.34: icmp_seq=1 ttl=244 time=8.17 ms
64 bytes from 132.245.160.34: icmp_seq=2 ttl=244 time=8.00 ms
64 bytes from 132.245.160.34: icmp_seq=3 ttl=244 time=8.23 ms
64 bytes from 132.245.160.34: icmp_seq=4 ttl=244 time=8.89 ms
64 bytes from 132.245.160.34: icmp_seq=5 ttl=244 time=12.7 ms

….

So that, you now know which SMTP server alias should be used for your case.

Travel

Travelling in Singapore

Transportation: Plan and Router

http://journey.smrt.com.sg/

http://www.streetdirectory.com/routing/

The MRT map: https://www.transitlink.com.sg/images/eguide/mrt_sys_map_3.jpg

Tax reduce at Changi airport

Phone & Mobile

Country code: 65

Call from foreign country: 00 65 xxxxxxxx

Prices:

  • International call (to Vietnam on 10/2015):
    • M1: (7am-8h59pm) 1.35 $/min
      (9pm-6:59am) 1.31 $/min

Employment Pass Centre

Top places in Singapore

Marina Bay Sands (Skypark)
Merlion Statue – Merlion Park
Sentosa
Singapore Zoo
Jurong Bird Park
Singapore Botanic Gardens
Universal Studios Singapore
Singapore Flyer
Night Safari
SGArab Street
Underwater World
SGRiver Safari

For Employment Pass and Dependent Pass.

#04-01/02, The Riverwalk, 20 Upper Circular Rd, Singapore 058416
6438 5122