Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified week01/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion week01/hw/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Refer to https://docs.nvidia.com/jetson/archives/jetpack-archived/jetpack-33/ind
To reiterate, you will need a machine running Ubuntu 16.04 or Ubuntu 18.04. If you do not have one, you will need to create a VM running Ubuntu.

#### VM Installation (if needed)
Download Virtual Box [here](https://www.virtualbox.org/wiki/Downloads) and the extension to give VMs access to your USB hubs [here](https://download.virtualbox.org/virtualbox/5.2.14/Oracle_VM_VirtualBox_Extension_Pack-5.2.14.vbox-extpack). First download the Ubuntu 16.04 iso image [here](http://releases.ubuntu.com/16.04/ubuntu-16.04.5-desktop-amd64.iso). Open Virtual Box and select "New" in the upper left corner. Make sure the type and version are "Linux" and "Ubuntu 64-bit". When prompted, choose to create a virtual hard disk and VDI as the type. The size of the disk should be 55GB absolutely minimum.
Download Virtual Box [here](https://www.virtualbox.org/wiki/Downloads) and the extension to give VMs access to your USB hubs [here](https://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack). First download the Ubuntu 16.04 iso image [here](http://releases.ubuntu.com/16.04/ubuntu-16.04.5-desktop-amd64.iso). Open Virtual Box and select "New" in the upper left corner. Make sure the type and version are "Linux" and "Ubuntu 64-bit". When prompted, choose to create a virtual hard disk and VDI as the type. The size of the disk should be 55GB absolutely minimum.

NOTE: if you are on Windows and are not seeing the 64-bit option for VMs, please look [here](https://forums.virtualbox.org/viewtopic.php?f=1&t=62339). Unfortunately, Docker on Windows does not currently support USB. Therefore, you can't use it, which leads you to having to install VirtualBox and disabling HyperV, per the instructions, if it was previously enabled.

Expand Down
142 changes: 142 additions & 0 deletions week08/hw/README1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Homework 6:
## Part 1: Image Annotation
For this homework, you will be annotating the Millennium Falcon and TIE Fighters in images from Star Wars: The Force Awakens.

The Millennium Falcon

![Image of the Millennium Falcon](./falcon.jpg)


Three TIE Fighters

![Image of the Millennium Falcon](./fighters.jpg)


Annotations for an image include the object coordinates and the corresponding label or class.
For example, an image with two TIE Fighters will have an annotation similar to:

```xml
<annotation>
<folder>images</folder>
<filename>image1.jpg</filename>
<size>
<width>1000</width>
<height>563</height>
</size>
<segmented>0</segmented>
<object>
<name>Tie Fighter</name>
<bndbox>
<xmin>112</xmin>
<ymin>281</ymin>
<xmax>122</xmax>
<ymax>291</ymax>
</bndbox>
</object>
<object>
<name>Tie Fighter</name>
<bndbox>
<xmin>87</xmin>
<ymin>260</ymin>
<xmax>95</xmax>
<ymax>268</ymax>
</bndbox>
</object>
</annotation>

```
Spending no more than 3 hours, annotate images, identifying the Millennium Falcon and TIE Fighters. You will want to use an image tool such as labelImg (https://github.com/tzutalin/labelImg) or RectLabel (macOS only, available in the App Store) and export the annotations in the PASCAL VOC format. As this requires the user of a user interface, it is recommended that your normal workstation be used.

G> Using the labelImg tool
Requires pipenv
https://github.com/pypa/pipenv

Installed labelImg using the following after downloading the repo
ls
452 brew install libxml2
453 brew install libxml2
454 ls
455 make qt5py3
456 mkdir /tmp/labelImgSetup
457 cd /tmp/labelImgSetup/
458 ls
459 curl https://codeload.github.com/tzutalin/labelImg/zip/master --output labelImg.zip

Python 3 + Qt5 (Works on macOS High Sierra)

brew install qt # will install qt-5.x.x
brew install libxml2
make qt5py3
python3 labelImg.py
python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

As a side note, if mssing pyrcc5 or lxml, try
pip3 install pyqt5 lxml


Images should be annotated with the following rules:

* Rule 1: Include all visible part and draw as tightly as possible.
* Rule 2: If multiple instances, label all instances.
* Rule 3: Occluded parts do not matter as long as all visible parts are included.

Steps (Assuming labelImg):
1. Install the tool, following the steps on https://github.com/tzutalin/labelImg
2. Clone the repository https://github.com/rdejana/MIDS_HW8 into a working directory, e.g. /Users/rdejana/Documents/Homework. In the subdirectory IDS_HW8/images/, you'll find the images that you'll be annotating.
3. Create a directory that'll be used to store the annotations, for example /Users/rdejana/Documents/Homework/MIDS_HW8/annotations.
4. Start lalbeImg
5. Click "Open Dir" and select the images directory, e.g. Users/rdejana/Documents/Homework/MIDS_HW8/images
6. Make sure that PascalVOC is displayed under the "Save" icon.
7. Click "Change Save Dir" and set it to your annonations directory.
8. Start annotating. Select "Create RectBox" and draw the bounds around any instances of Millennium Falcon or TIE Fighers you see in the image, adding the correct label. When done with an image, press "Save". Continue on to the next image repeating the process until complete or your reach the time limit.


Questions:
1. In the time allowed, how many images did you annotate?
>>>>300 Images
2. Home many instances of the Millennium Falcon did you annotate? How many TIE Fighters?
>>>>I did not precisely count
3. Based on this experience, how would you handle the annotation of large image data set?
>>>>using a service such as Mechanical Turk or kids trying to earn some cash. In each case it'll be good to spread the work among a group of people (to avoid fatigue) and also have someone doing quality control in a randomized fashion
4. Think about image augmentation? How would augmentations such as flip, rotation, scale, cropping, and translation effect the annotations?
>>>>The images belongting to the 2 categories are very distinct. Augmentations would not change the annotation. May be translation would a little


## Part 2: Image Augmentation
For part 2, you will need to install docker in a VM or your local workstation.

1. Run the command:
```bash
docker run -d -P 8888:8888 ryandejana/hw8augmentation
```
2. If using a VM, open your browser to ```http://<<yourPublicIP>>:8888/notebooks/augmentation.ipynb``` or if local, ```http://127.0.0.1:8888/notebooks/augmentation.ipynb``` and login with the password ```root```.
3. Run the notebook.

If you wish to experiment with the augmenation library, see https://github.com/codebox/image_augmentor

Questions:
1. Describe the following augmentations in your own words
- Flip
- Rotation
- Scale
- Crop
- Translation
- Noise

## Part 3: Audio Annoation
Take a look at and explore the audio annotation tool CrowdCurio https://github.com/CrowdCurio/audio-annotator)

Questions:
1. Image annotations require the coordinates of the objects and their classes; in your option, what is needed for an audio annotation?

## What to turn in
### Part 1
1. A zip or tar file of your annoations.
2. Your answers to questions 1 through 4.

### Part 2
1. Your answer to question 1.

### Part 3
1. Your answer to question 1.