Monday, August 16, 2010

New post!

My work.

It seems that my work with the bee counting program has come to a halt. After thinking about it and talking to Michael, the person who worked with this program previously, there isn't much I can do to improve the program's chances of accurately counting the bees, unless we have access to an infrared camera...





... which then, will result in such an image. This, I think, would be an ideal solution to track bees precisely, because only the bees emit red heat, while the surroundings are cold blue. This kind of stark contrast is precisely what the program needs.












Then, after messing with the color levels, such an image could be produced. Hold on, there's one more step...









After messing with the contrast of the picture, you get this. You can invert the colors to get black on white. Right now, this is the best way for a machine to count bees. As you can see, there are still problems when the bees are too close to each other, as two bee blobs form into one ugly-looking abomination. Presently, this is not a problem that a machine can solve. Perhaps there exists a much more sophisticated way to detect bee, but I don't think I'll be developing that algorithm anytime soon, hah.



Michael said he's played with the bee images a bunch of times to try to make counting better, with no results. If Michael, who has more experiences and resources than I, can't do it, how can I? I know this is defeatist thinking, but if I spend a lot of time trying to improve the accuracy without any results, that would be frustrating. Then again, if I don't even try, I won't find out. Hmm...

In any event, I took a two-week break from the counting program and did some work related to Allison's project. There exists some Ruby scripts that loads images from a computer to a website, and creates thumbnails for them. My job was to modify these scripts to make them work for audio files. Audio data has a whole different set of metadata (data about data) than image files. Regarding image files and audio files, the former has things like width, height, exif version, color space, orientation, and the latter has things such as length, bitrate, sampling rate, number of channels, etc.

I had to work with a completely different set of resources to extract such information. I found out the hard way that it is very difficult to work with Ruby in a Windows environment. Much of the resources and instructions I found online were tailored for Linux. Sooo, I decided to to install Linux on my computer. At first, I installed Linux so that I could dual boot it (which means I can choose Windows or Linux when I turn my computer on). Then I changed my mind and just used Virtual Box, which is software that can emulate different operating systems.

BUT installing Linux on my laptop in the first place caused so many problems. Long story short, sometimes my computer thinks that my copy of Windows 7 is not genuine at it refuses to start up when I wake it up from sleep. Then after I force-restart it prepares to configure Windows, as if I had just installed a new copy. It gets stuck in that screen and I have to force-restart it. Sometimes I can fix this problem, and other times I can't access my laptop. This problem is reoccurring and extremely frustrating, and I won't be able to fix it permanently until I go back to the US and reinstall Windows using my installation disc.

Anyway, that's my problem and I'll deal with it.

I'm very close to completing my work with Ruby, and I am getting ready to work with the bee counting program some more. If I can't improve the counting accuracy for the photos in their current state, maybe I can create features that will work for infrared photos, in case infrared cameras get cheaper in the future and will be able to be used for regular fieldwork. That's the most I can do, it seems.

Well, back to work. Peace out.

Friday, July 9, 2010

I'm so good at using chopsticks, I drink water with them

It is currently 5:3o PM, Taiwanese time.

So where was I? Oh yes, I was just starting to talk about my trip to Taipei 101.

Let me start by introducing you to the wonderful group of people who I shared this experience with.


Top, from left to right: Cato, Allison, Jason, who's that creep!?

Bottom, from left to right: Sophia, Vicki

Cato, Vicki and Allison are from PRIME. Allison is my partner and I live and work with her right now. Sophia and Jason are my coworkers and work under Dr. Sheng-Shan Lu. They are pretty awesome and we've gotten pretty close, going to lunch every day and joking around. Along with Poki (who took this picture), they have taught me most of the Chinese words and phrases I know today. I've taught them some obscure English words and, no kidding, some Spanish words. I've expanded Jason's Spanish vocabulary beyond his initial "Buenos dias, senorita". Jason is pretty funny and smart and pretty good at making puns. Sophia is a sweetheart and is very helpful whenever I need help.

Because she wasn't shown in the previous picture, this is Poki, next to Allison. She is very nice and likes to joke around and tease people. I knew from day one she would give me a hard time. The first time we all went out to get lunch, I zoned out and wandered ahead of the group, going straight when we would've had to turn left. She yelled "Bye bye!" This coming from a then-almost complete stranger. She likes to teach me new Chinese phrases and words. One day she taught me how to say "You are very beautiful" in Chinese, so that I could say that to my girlfriend. Jason joked that she taught me that so I could say that to Poki and boost her self-esteem. Jason is so silly.


So after paying the 500 NT and going up to the 90 ish floor, we were given a headset that allowed us to hear recorded messages containing information about the different stations around the floor. The stations overlooked certain important areas around Taipei.

I noticed all the green and how the trees were in harmony in the city, as they seemed to mingle with the bustling buildings quite comfortably. It doesn't hurt that Taipei is located on a basin and is surrounded by gorgeous green mountains.



One floor contained a slew of gorgeous coral gemstone carvings. The eagle is just one of many amazing carvings I saw. More pictures can be found on my facebook page, as always. Coral gemstone jewelry were also for sale, but they were prices steeply, for reasons that will be clear soon.

Coral gemstones are the hard skeleton of red coral; they are like precious stones. Coral gemstones are found at the bottom of the sea, generally in areas that too deep for regular deep sea divers. This is why they are rare and valuable. The fact that they look dazzling doesn't hurt, either.


We went to the highest point in the tower, where, despite the strong gusts, had an amazing view of the city. It was a photography enthusiast's heaven; you could pretty much see everything. It's hard for me to resist a good sunset photograph. One that's of the sun overlooking a gorgeous city is a big plus.




Well, there you go. That's a Taipei 101 in a nutshell. If you're ever in Taiwan, checking out this place is a must. Afterwards, our group got lost trying to get to a night market, so we decided to eat at a sit-down restaurant, got some delicious shaved ice (my favorite Taiwanese thing ever), and called it a day.

I figured it would be appropriate to end this blog with an obscure, unorganized list.

More Foods I've Eaten:
- Taiwanese sausage (deliciously grilled)
- Watermelon juice
- Wax apple
- Passionfruit flavored popsicles, syrups, etc
- Tomato and beef broth noodle soup (the "noodles" were actually long slices of dough)

Number of Couples I've seen in Taiwan Consisting of a White Guy and an Asian Girl (aka the Yellow Fever count): 11 (and rising!)

Times I've Eaten Way too Much: (lost count!)

Sunday, July 4, 2010

Summary of this past week + weekend

It is currently 9:39 PM Taiwanese time, Sunday, July 4th.

It has been a long time since I posted something new. Well here you go. I could go on forever about what I have been up to in this wonderful island of Taiwan, but I won't. So here is a pseudo-summary of my adventures:

Food I've eaten:

More shaved ice!!!

Bottom left is mine. I assumed the white jellies were litchi jellies, which I love, but they are actually almond jellies. Note the pineapple. It was the best pineapple chunks I've ever had.

Bottom right is a special kind of shaved ice that is extra finely shaved, and is made of frozen milk instead of regular ice. It had a great texture and was very delicious.






A Traditional Taiwanese food



Don't know how to spell it, but it sounds something like li wei. You pick ingredients from pile and they boil them for use and add their secret sauce. It was really, really good. It was so good the line was super long. Thank you to June, Vicki's aunt's friend, for showing this place to us :)







Taiwanese Pizza from... Pizza Hut?

Pizza party on Thursday to welcome Allison, Dr. Wong, and I. Dr. Wong is post-doc who just joined the team. He is hoping that Allison and I would teach him everything we know about RBNB, RDV, and Java, haha. I hope I can be a good teacher ^^;

Pizzas include shrimp, mushroom and crab; kimchi and beef (no joke), shrimp and squid (with this amazing white sauce.) There were two vegetarian pizzas and some others I didn't try, unfortunately.


Another noteworthy memory would be a really really fancy place we went to, where we got treated an 8-course meal. We were treated by the mother of Tiffany, a friend of Vicky's. Tiffany and her brother Howard were born in Taiwan, and moved to the US many years ago, so they speak fluent Chinese and are familiar with Taipei. The place was sort of a Japanese-Western fusion and was pretty fancy; it had excellent service. They had the kind of food where the plating is so artistic that you feel a little guilty for eating. Everything was absolutely delicious and my company wasn't so bad either :) Unfortunately, that night I forgot to bring my camera. Luckily, Vicky took some pictures of my food for me and I should have them on hand shortly.

Work:

Admittedly, work is going slow. Coming here, I had an idea in my head of what needs to be done and what work will be like, but it turned out quite differently. Apparently communication between us in UCSD with TFRI was not very good before leaving. Networks that I thought needed setting up were already set up, and programs that I thought needed writing were already written and worked fine. The language barrier also presented a challenge. Everyone in TFRI could speak English, but it was still difficult to understand each other sometimes. This made communication project details harder.

After talking to the right people, I managed to make a mental list of tasks I need to accomplish:

- Write generic source code that can cater to any of the forms of data used by the researchers. This will be helpful to them.

In simpler terms: write a program that puts stuff into a server.
In even simpler terms: write stuff.

I won't be able to really start this until I go to the field site Lienhuachih on Tuesday. It's in the middle of Taiwan, near Taichung. The area of the field site is sub-tropical mountains. I imagine I will make fast friends with my bug spray there.

- They have a program, written by my genius and super awesome peer mentor Michael Nekrasov (you reading this? :P) that recognizes "blobs" in picture. "Blobs" are pretty much shapes that contrast the background in color. This program puts a box on those blobs and can even count how many boxes there are. The researchers use this program to count bees from pictures that they have accumulated from a network camera that takes a picture every minute, 30 days a month, 12 months a year. I have, on my laptop, pictures from 2006-2009 (missing a few months though). There are about half a million pictures, 20 GB in size (for those who are not familiar with computer memory measurements, that is HUGE.)

Anyway, my task is to run this program and compare it with average counts (per year) gained by, and I am not kidding, hand counting. I can imagine some poor undergraduate toiling away all night, counting bees endlessly. That would be enough to drive a man to despise bees for the rest of his life. Another task that was added more recently is to figure out a proper snapshot frequency that is sufficient for accuracy. That is, compare results from average counting when a picture is taken every minute vs. every 10 minutes, etc. I estimate that taking it every minute is a little excessive. 5-10 minutes sounds about right.

In simpler terms: count bees using a really smart program.
In even simpler terms: do grunt work. I'm grateful that at least I don't have do hand count any bees.

- There are another group of researchers who monitor the plant Podocarpus nakaii in Lienhuachih. Podocarpus nakaii trees are super rare and are only found in Taiwan, and is only found in Lienhuachih. These trees are endangered and that is why it's a big deal. Right now they are trying to figure how and when this plant gets pollinated and using this information, save the species.

(Podocarpus fruit)

What they really need right now is a way to detect a certain event (namely, the seed of the tree blooming into a flower, then into a fruit). The problem is, the seed is about 1-2 mm in diameter and the cameras they are using can't zoom in that close. A camera that could do that would probably be too expensive for them.

If a hardware solution is out of reach, a software one might be the only choice. I suggested some sort of event detection scheme that is related to blob detection, something that would raise a flag when the seed has turned into something of a certain size. This is actually a lot more difficult than it sounds. My focus right now are the bees, but I would really like to help them if possible, as Podocarpus nakaii fascinates me. One of the researcher suspects that this species is able to change genders.

In simpler terms: help researchers find a way to detect when and how the Podocarpus nakaii gets pollinated.
In even simpler terms: save some plants.


Places I've Been to:


June, who took us to eat the traditional Taiwanese food, works for Yahoo. It is located on four floors of a building that also had a radio station. This place was pretty fancy.

After showing us around, we went into the game room. Man, working for Yahoo! wouldn't be too bad. Although Google probably has some pretty good accommodations too. This room had a basketball shooting game, air hockey, a ping-pong table, a foozball table, and a drumming game. There was also a really, really expensive massage machine. One of those ones that looks like some sort of time machine from the future (or from the past, for that matter). Nobody uses it because it's kinda awkward to be sitting in one of those while everyone else is busy playing games.

Taipei 101! - 臺北101

The ground area of Taipei 101 is surrounded by tons of really modern malls and an amazing bookstore called Eslite that has about 8 floors (no joke). It's more than a bookstore, it's also a center for artwork and creativity. There were tons of little trinkets, funny bumper stickers, and puzzles. We only managed to check out about two floors because it was getting late. Definitely worth checking out again sometime. You could easily spend a whole day in there :) (and I probably would, sadly :P)

What is Taipei 101, you ask? It's truly a marvel of engineering, this tower has 101 floors and is over 500 meters tall. It is one of the second tallest buildings in the world and is one of the Seven Wonders of the World. According to wiki: "Planners aimed for a structure that could withstand gale winds of 60 m/s (197 ft/s, 216 km/h, 134 mph) and the strongest earthquakes likely to occur in a 2,500 year cycle."

I also saw this tower's damper, a 5.5-m diameter, 6.6 metric ton sphere there absorbs the shock from earthquakes. It is affectionately referred to as the "damper baby".

I will post a more detailed account of Taipei 101 (complete with more pictures!) and other adventures. But for now, I will retire from this blog. More to come next time!

Thursday, June 24, 2010

Stinky tofu is not for me

It is currently 11:27 PM, Taiwanese time.

So, I arrived safely in Taipei and met up with my partner and two other people, Vicki and Cato, who will work not too far from where we are staying. There was some confusion with the driver, who spoke no English, and we spoke very little Mandarin. He was supposed to take Vicki and Cato as well and drop us off in our respective groups, but none of us knew that. He made a phone call to an unnamed lady who translated to us that the driver was wondering where the other two people were (only Allison and I followed him to begin with :P)

The driver dropped us off a small apartment right across the street from a 7-11 .Yes, they have those here too, except the wares are a lot more Taiwanese, as you can imagine. We finally meet our mentor and provider, Dr Shen-Shan Lu, who greeted us warmly and promptly showed us to our apartment and gave us a tour.

This is our living room. I love that fan, seriously.



This is my room:



Our kitchen! The machine which you can only see half of is for water. The hot water is really HOT! There's a small fridge behind the door and no microwave, but I'm not worried about that.


Initial observations about Taipei after a little exploring:
- The buildings here are, shall we say, spatially efficient. I've never seen so many little stores in one area. There are easily 20 different food places in just a mile or two radius around our apartment. Also around 10 bicycle/auto stores.
- Scooters and motorcycles outnumber cars 10 to 1. Oh, and the traffic is pretty crazy here! It is common to see motorcycles weave in and out of the way of trucks or cars. There is always a crazy amount of scooters parked outside a building.

After waking up this morning and taking care of blogging/email/etc business, Allison and I went for a walk to look around. Apparently there's an exhibition going on in the local museum, covering the Chinese war of three nations. We headed to the botanical garden, which is where we're going to be working for the next 4 weeks (after that we're going to the field sites). We went to the wrong building, to the confusion of our mentor. He sent two of his staff member, Sophia and Jason, to fetch us. They brought us to the correct building and we met the rest of Dr Lu's staff: Poki, Anita, and Michael. Super awesome friendly bunch.

It was around lunch time when we arrived so we walked to a noodle place and were treated to some vegetable noodle soup. There were these chunks in the soup that I swear looked and tasted like meat, but were made of soy beans, if I'm not mistaken. We ordered a plate of stinky tofu, after I was persuaded to at least give it a try. It really did reek, they weren't kidding. After I bravely tried a bite, I decided that stinky tofu is not for me (and we have a blog title, folks!) Jason joked that he hated stinky tofu. "I hate it, so I must destroy it," he said, taking a big bite.

Allison and I spent the rest of the after working on our demonstration with two cameras and one microphone, reviewing it so that when we actually present it, everything goes smoothly.

Chinese I learned today:

Store: 商店 (Shāngdiàn) - dian means store, add a prefix to describe what kind of store. Shangdian just means any kind of store. Bookstore - shu dian
Restaurant: 餐厅 (Cāntīng)
Goodbye: 再见 (Zàijiàn)
You're welcome: 不客气 (Bù kèqì)
Elevator: 电梯 (Diàntī)
Stinky tofu: 臭豆腐 (Chòu dòufu)
Forest: 森林 (Sēnlín)

Zai jian! (for now)

Wednesday, June 23, 2010

Flight + Arrival in Taiwan

It is currently 8:53 am, Taiwanese time.

Hello there. For those who don't know, this blog is dedicated to my experiences in Taiwan as I stay here for a 9-week internship through PRIME, a UCSD program that sends undergraduates overseas to do research.

Don't want to bore you with the details, so here's the skinny: my partner Allison and I will be working with servers that connect to various sensors. We also have a real-time data viewer that allows you to see data (such as audio or video) in, as you might have guessed, real time. I will be dealing with network cameras that monitor bees and Allison will be working with microphones that monitor frog sounds. We are working under ecologists from the Taiwanese Forestry Research Institute.

I love airports. They're like little sterile malls that have airplanes in them. My lovely parents and girlfriend and I checked out the stores. I wanted to get a souvenir for my Taiwanese mentors. They had sorts of fancy food places, but my mom, being the thrifty person that she is, brought us all sandwiches and sodas, haha.

My flight from LAX was okay, minus the random shaking from the plane, which happened way more often than the last time I took a plane. I sat next to a homely Mexican couple who were on their way to their honeymoon in Thailand. They slept through about half of the flight, it seemed. Having all my books in my luggage, clumsily, and there being no outlet to plug in my laptop, I thought I was going to be severely bored, but the flight offered plenty of things in terms of entertainment: music, movies, and television episodes, both Western and Eastern ones.

So, I ended up watching four movies. Here's the skinny:

The Girl with the Dragon Tattoo: Swedish with English subtitles. Girl had 1337 hacking skillz. Pretty gruesome and violent at some parts, but overall was a pretty good movie.

Daybreakers: English with Chinese subtitles. Vampires take over the world and harvest humans for blood. Terrible movie, don't watch it. Predictables plot, plot holes, and bad acting.

Edge of Darkness: English with Chinese subtitles. Homicide detective investigates the murder of his daughter. Mel Gibson was fantastic. Movie was pretty dark. I missed most of the important talking points though because everyone in the movie decided to talk in a low voice. Pretty annoying. Otherwise, great movie.

Saru Lock: Japanese with English subtitles. Pretty random choice of mine. A locksmith gets involved with the Yakuza in a Japanese comedy/drama/action. It was pretty funny in a cheesy way.

That's it for now. I'm going to go exploring. Will post more about my arrival and place of living later.