Blog of science and life

Contact
Archives
Feed

Articles by Do Anh Tu

Kaggle Bird Classification with sound


Problem

Kaggle url

As the “extinction capital of the world,” Hawai'i has lost 68% of its bird species, the consequences of which can harm entire food chains. Researchers use population monitoring to understand how native birds react to changes in the environment and conservation efforts. But many of the remaining birds across the islands are isolated in difficult-to-access, high-elevation habitats. With physical monitoring difficult, scientists have turned to sound recordings. Known as bioacoustic monitoring, this approach could provide a passive, low labor, and cost-effective strategy for studying endangered bird populations.

Current methods for processing large bioacoustic datasets involve manual annotation of each recording. This requires specialized training and prohibitively large amounts of time. Thankfully, recent advances in machine learning have made it possible to automatically identify bird songs for common species with ample training data. However, it remains challenging to develop such tools for rare and endangered species, such as …

Read more

Overcome the fear

In Life

One day you don't know what to do anymore. The future is so unpredictable. Too much choices. You must make the decission.

Yes, the pain is real. The fear is real. You want to run away from it. Why should you suffer from those horrible feelings? You can find other thing to do, the "easier" things.

But don't.

Because each time you let them scare you aways, you learned nothing. You are not improved. You are not lived.

Change is hard. Makes you feel like everything you have done is wrong. You're failed. You must find a new way, a new approach, a new mindset to achieve your goal.

It sucks. But it's neccessery. It's the way nature works. Improvise, adapt, overcome.

And after all the hard works, the map of the real world will be updated. You know how things works now. It's awesome.

But …

Read more

Django full text search (Postgres)


Let's say we have a large database, few milions row, one-to-many relationship models with some text field, and we want to search some keywords.

Traditional way will be real pain and slow, I know. So let's do something smart and enjoy lightning-fast execution with Full Text Search.


Suppose we have an app named main and it's models look like this

from django.db import models

class Parent(models.Model):
   title = models.CharField(max_length=255)

class Child(models.Model):
   parent = models.ForeignKey(Parent, on_delete=models.CASCADE, related_name="children")
   content = models.TextField(null=True, blank=True)

For example, we want to search keyword in childs content, and we want to do it quick! You can do like this, but that not quick enough for me. Maybe because I have too damn much data. But there are other way. First we need to add this line to settings.py

settings = [
    # ...
    "django.contrib.postgres …
Read more

« Page 6 / 11 »