Commit 07874238 authored by Rohan  Kumar's avatar Rohan Kumar
Browse files

Revert "resolved errors scene on lab machine"

This reverts commit 7babb541
parent 7babb541
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
{
<<<<<<< HEAD
    "java.configuration.updateBuildConfiguration": "interactive"
=======
    "java.compile.nullAnalysis.mode": "automatic"
>>>>>>> 197296f30ca7b0c49c8308bf3194348f11ab6a30
}
 No newline at end of file
+0 −2
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ graph LR;

### Features

<<<<<<< HEAD
- [10%] Object Recognition: using YOLOv4, we used the weights from the model, and created a YoloNet, which is trained as a convolutional neural network that detects objects within a 2D image.
- [30%] Performance Optimization: we developed the ObjectSet data structure, that iterates over the frames of a video, and on each frame, incorporates more information. The ObjectSet holds a list of PointSets, and each PointSet represents a collection of 3D points that constitute an object within the real world. At each iteration, we find new candidate objects from the new frame, and iteratively check if these new objects are instances of previously found PointSets, or previously undiscovered objects within the real world.
    > For this feature, we have not fully optimized it, and we plan on improving in before the final report
@@ -134,4 +133,3 @@ The following links:
- The database used was via [MongoDB](https://www.mongodb.com/), and the database itself was hosted on MongoDB provided free-tier server
- The testing was done using [JUnit](https://junit.org/junit5/) 
- The mathworks Monocular VSLAM tutorial is used to guide our vslam_implemenation matlab script [VSLAM](https://www.mathworks.com/help/vision/ug/monocular-visual-simultaneous-localization-and-mapping.html)
+3 −2
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <exec.mainClass>top.BackendJava</exec.mainClass>
        <!-- <exec.mainClass>yolo.YOLODetector</exec.mainClass> -->
    </properties>

    <build>
+0 −27
Original line number Diff line number Diff line
#!/bin/bash

# Define the script that runs the VSLAM implementation
<<<<<<< HEAD
<<<<<<< HEAD
MATLAB_SCRIPT="/src/main/java/vslam/vslam_implementation_rgbd.m"

# Check if the correct number of arguments was provided
if [ "$#" -ne 1 ]; then
    echo "Usage: $0 {tum_rgbd_dataset|imperial_college_london}"
    exit 1
fi

# Determine which dataset to use based on the argument provided
if [ "$1" = "tum_rgbd_dataset" ]; then
    DATASET_NAME="tum_rgbd_dataset"
elif [ "$1" = "imperial_college_london" ]; then
    DATASET_NAME="imperial_college_london"
else
    echo "Invalid dataset name. Choose either 'tum_rgbd_dataset' or 'imperial_college_london'"
    exit 2
fi
=======
MATLAB_SCRIPT="/src/main/java/vslam/vslam_implementation.m"

# Define the dataset name
DATASET_NAME="self_made_dataset"
>>>>>>> divider
=======
MATLAB_SCRIPT="/src/main/java/vslam/vslam_implementation.m"

# Define the dataset name
DATASET_NAME="self_made_dataset"
>>>>>>> 197296f30ca7b0c49c8308bf3194348f11ab6a30

# Navigate to the MATLAB script directory (assuming MATLAB can be called from command line)
cd src/main/java/vslam
+8 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ public class MongoDBInteraction {
        this.mongoClient = MongoClients.create(settings);
        this.database = mongoClient.getDatabase("Objects");
        this.objectCollection = database.getCollection("objectSets");
        System.out.println("MongoDB Connection Established");
    }


@@ -45,8 +46,10 @@ public class MongoDBInteraction {
        try {
            Document doc = objectCollection.find().sort(new Document("index", -1)).first();
            if (doc == null) {
                System.out.println("No document found.");
                return null;
            } else {
                System.out.println("Document found: " + doc.toJson());
                return convertDocumentToObjectSet(doc);
            }
        } catch (Exception e) {
@@ -57,11 +60,13 @@ public class MongoDBInteraction {

    private ObjectSet convertDocumentToObjectSet(Document doc) {
        if (doc == null) {
            System.out.println("Document is null, no conversion possible.");
            return null;
        }

        List<Document> pointSetDocs = doc.getList("objectSets", Document.class);
        if (pointSetDocs == null || pointSetDocs.isEmpty()) {
            System.out.println("No point sets found in document.");
            return new ObjectSet();
        }

@@ -71,7 +76,7 @@ public class MongoDBInteraction {
            if (pointSet != null) {
                objectSet.objects.add(pointSet);
            } else {
                System.out.println("Failed to convert point set document");
                System.out.println("Failed to convert point set document: " + pointSetDoc.toJson());
            }
        }
        return objectSet;
@@ -79,6 +84,7 @@ public class MongoDBInteraction {

    private PointSet convertDocumentToPointSet(Document doc) {
        if (doc == null) {
            System.out.println("PointSet document is null.");
            return null;
        }

@@ -93,6 +99,7 @@ public class MongoDBInteraction {

        List<Document> pointsDocs = doc.getList("points", Document.class);
        if (pointsDocs == null) {
            System.out.println("No points found in point set document.");
            return new PointSet(idx);
        }

Loading