Mohit SenapatiPriya C
Published © CERN-OHL2

Artemis -the smart wildlife tracking solution

Artemis uses the current SmartParks collar design and takes it up a level, equipping it with new tracking technology that brings a change.

IntermediateFull instructions provided1,295
Artemis -the smart wildlife tracking solution

Things used in this project

Hardware components

OpenMV Cam M7
OpenMV Cam M7
×1
OpenMV FILR Lepton Adapter module
×1
Nano 33 BLE Sense
Arduino Nano 33 BLE Sense
×1

Software apps and online services

Edge Impulse Studio
Edge Impulse Studio
Arduino IDE
Arduino IDE
OpenMV IDE
node.js

Story

Read more

Code

Neural Network Architecture for Elephant Behaviour monitoring

Python
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, InputLayer, Dropout, Conv1D, Conv2D, Flatten, Reshape, MaxPooling1D, MaxPooling2D, BatchNormalization
from tensorflow.keras.optimizers import Adam
from sklearn.utils.class_weight import compute_class_weight

class_weights = dict(enumerate(compute_class_weight('balanced', np.unique(np.argmax(Y_train, axis=1)), np.argmax(Y_train, axis=1))))

# model architecture
model = Sequential()
model.add(InputLayer(input_shape=(input_length, ), name='x_input'))
channels = 1
columns = 32
rows = int(input_length / (columns * channels))
model.add(Reshape((rows, columns, channels), input_shape=(input_length, )))
model.add(Conv2D(8, kernel_size=3, activation='relu', kernel_constraint=tf.keras.constraints.MaxNorm(1), padding='same'))
model.add(MaxPooling2D(pool_size=2, strides=2, padding='same'))
model.add(Dropout(0.5))
model.add(Conv2D(16, kernel_size=3, activation='relu', kernel_constraint=tf.keras.constraints.MaxNorm(1), padding='same'))
model.add(MaxPooling2D(pool_size=2, strides=2, padding='same'))
model.add(Dropout(0.5))
model.add(Flatten())
model.add(Dense(classes, activation='softmax', name='y_pred'))

# this controls the learning rate
opt = Adam(lr=0.005, beta_1=0.9, beta_2=0.999)

BATCH_SIZE = 32
train_dataset, validation_dataset = set_batch_size(BATCH_SIZE, train_dataset, validation_dataset)
callbacks.append(BatchLoggerCallback(BATCH_SIZE, train_sample_count))

# train the  network
model.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['accuracy'])
model.fit(train_dataset, epochs=80, validation_data=validation_dataset, verbose=2, callbacks=callbacks)
model.fit(X_train, Y_train, batch_size=32, epochs=80, validation_data=(X_test, Y_test), class_weight=class_weights)

Credits

Mohit Senapati

Mohit Senapati

5 projects • 4 followers
Priya C

Priya C

0 projects • 1 follower

Comments