This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4585801
commit 89988c6
Showing
7 changed files
with
161 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ demos/doom-earth.wad | |
lib/ | ||
deploy/ | ||
backup/ | ||
extract/ | ||
extract/ | ||
smartcam/config.dev.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,39 @@ | ||
#!/bin/sh | ||
|
||
echo "Installing experiment..." | ||
echo "Installing..." | ||
chown -R exp272:exp272 /home/exp272 | ||
chmod -R 770 /home/exp272 | ||
chmod +x /home/exp272/src/chocolate-doom | ||
ln -s /home/exp272/lib/libSDL-1.2.so.0 /lib/libSDL-1.2.so.0 | ||
ln -s /home/exp272/lib/libSDL_mixer-1.2.so.0 /lib/libSDL_mixer-1.2.so.0 | ||
ln -s /home/exp272/lib/libSDL_net-1.2.so.0 /lib/libSDL_net-1.2.so.0 | ||
echo "Installation completed." | ||
chmod +x /home/exp272/src/opssat-doom | ||
chmod +x /home/exp272/start_exp272.sh | ||
chmod +x /home/exp272/smartcam/start.sh | ||
|
||
# Backup the SmartCam config | ||
if [ -e "/home/exp1000/config.ini" ] && [ ! -e "/home/exp1000/config.ini.backup" ]; then | ||
mv /home/exp1000/config.ini /home/exp1000/config.ini.backup | ||
fi | ||
|
||
# Check if /home/exp1000 directory exists before attempting to overwrite the SmartCam config | ||
if [ -d "/home/exp1000" ]; then | ||
cp /home/exp272/smartcam/config.ini /home/exp1000/config.ini | ||
fi | ||
|
||
echo "" | ||
echo "================= =============== =============== ======== ========" | ||
echo "\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //" | ||
echo "||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\/ . . .||" | ||
echo "|| . .|| ||. . || || . .|| ||. . || || . .|| ||. . || ||. . . . . . . ||" | ||
echo "||. . || || . .|| ||. . || || . .|| ||. . || || . .|| || . | . . . . .||" | ||
echo "|| . .|| ||. _-|| ||-_ .|| ||. . || || . .|| ||. _-|| ||-_.|\ . . . . ||" | ||
echo "||. . || ||-’ || || ‘-|| || . .|| ||. . || ||-’ || || ‘|\_ . .|. .||" | ||
echo "|| . _|| || || || || ||_ . || || . _|| || || || |\ ‘-_/| . ||" | ||
echo "||_-’ || .|/ || || \|. || ‘-_|| ||_-’ || .|/ || || | \ / |-_.||" | ||
echo "|| ||_-’ || || ‘-_|| || || ||_-’ || || | \ / | ‘||" | ||
echo "|| ‘’ || || ‘’ || || ‘’ || || | \ / | ||" | ||
echo "|| .===’ ‘===. .===’.‘===. .===’ /==. | \/ | ||" | ||
echo "|| .==’ \_|-_ ‘===. .===’ _|_ ‘===. .===’ _-|/ ‘== \/ | ||" | ||
echo "|| .==’ _-’ ‘-_ ‘=’ _-’ ‘-_ ‘=’ _-’ ‘-_ /| \/ | ||" | ||
echo "|| .==’ _-’ ‘-__\._-’ ‘-_./__-’ ‘’ |. /| | ||" | ||
echo "||.==’ _-’ ‘’ | /==.||" | ||
echo "==’ _-’ \/ ‘==" | ||
echo "\ _-’ ‘-_ /" | ||
echo " ‘’’ ‘‘’" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/sh | ||
rm /lib/libSDL-1.2.so.0 | ||
rm /lib/libSDL_mixer-1.2.so.0 | ||
rm /lib/libSDL_net-1.2.so.0 | ||
|
||
# Restore the backup of the SmartCam config | ||
if [ -e "/home/exp1000/config.ini.backup" ]; then | ||
cp /home/exp1000/config.ini.backup /home/exp1000/config.ini | ||
rm -f /home/exp1000/config.ini.backup | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[conf] | ||
downlink_log_if_no_images = yes | ||
entry_point_model = default | ||
downlink_thumbnails = yes | ||
downlink_compressed_raws = no | ||
downlink_compressed_split = 10M | ||
raw_compression_type = fapec | ||
collect_metadata = yes | ||
tle_path = /etc/tle | ||
quota_toGround = 100000 | ||
max_error_count = 10 | ||
|
||
[camera] | ||
cam_exposure = 2 | ||
cam_gains = [13,7,8] | ||
|
||
[gen] | ||
gen_type = aoi | ||
gen_interval_default = 0.5 | ||
gen_interval_throttle = 0 | ||
gen_number = 3 | ||
gen_geojson = aois/continents.json | ||
|
||
[img] | ||
raw_keep = no | ||
png_keep = no | ||
|
||
[jpeg] | ||
jpeg_scaling = 0.3 | ||
jpeg_quality = 90 | ||
|
||
[compression_fapec] | ||
chunk = 512K | ||
threads = 1 | ||
dtype = 16 | ||
band = 1 | ||
losses = x10 | ||
meaningful_bits = 12 | ||
lev = 5 | ||
|
||
[clustering] | ||
cluster = no | ||
cluster_for_labels = ["earth"] | ||
cluster_k = 4 | ||
cluster_collect_threshold = 10 | ||
cluster_img_types = ["jpeg","png","ims_rgb","fapec"] | ||
|
||
[model_default] | ||
default.tflite_model = models/default/model.tflite | ||
default.labels = models/default/labels.txt | ||
default.labels_keep = ["earth:doom","edge:doom","bad"] | ||
default.input_height = 224 | ||
default.input_width = 224 | ||
default.input_mean = 0 | ||
default.input_std = 255 | ||
default.confidence_threshold = 0.70 | ||
|
||
[model_doom] | ||
doom.bin_model = /home/exp272/smartcam/start.sh | ||
doom.labels = /home/exp272/smartcam/labels.txt | ||
doom.labels_keep = ["doom"] | ||
doom.input_format = jpeg | ||
doom.write_mode = /home/exp272/demos/doom.wad | ||
doom.args = | ||
doom.confidence_threshold = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
doom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/sh | ||
|
||
# function to show usage | ||
show_usage() { | ||
echo "Usage: $0 -i <image_filepath> -w <wad_filepath>" | ||
} | ||
|
||
# check if the number of arguments is correct | ||
if [ "$#" -ne 4 ]; then | ||
show_usage | ||
exit 1 | ||
fi | ||
|
||
# parsing arguments | ||
while getopts ":i:w:" opt; do | ||
case $opt in | ||
i) image_file="$OPTARG" | ||
;; | ||
w) wad_file="$OPTARG" | ||
;; | ||
\?) show_usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# check if both -i and -w arguments were supplied | ||
if [ -z "$image_file" ] || [ -z "$wad_file" ]; then | ||
show_usage | ||
exit 1 | ||
fi | ||
|
||
# check if both files exist | ||
if [ ! -f "$image_file" ] || [ ! -f "$wad_file" ]; then | ||
echo "Error: One or both files do not exist." | ||
exit 1 | ||
fi | ||
|
||
# todo: run the DOOM experiment | ||
# ... | ||
|
||
# if successful, print JSON string | ||
echo '{"doom": 1}' | ||
|
||
# successful exit | ||
exit 0 |