This file contains hidden or 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
cfg.MODEL.WEIGHTS = os.path.join(cfg.OUTPUT_DIR, "model_final.pth") # path to the model we just trained | |
cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.7 # set a custom testing threshold | |
predictor = DefaultPredictor(cfg) |
This file contains hidden or 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
from detectron2.utils.visualizer import ColorMode | |
json_file_test = "/mnt/d/RarePlanes/datasets/synthetic/metadata_annotations/instances_test_aircraft.json" | |
coco_test=COCO(json_file_test) | |
catIds = coco_test.getCatIds(catNms=['aircraft']); | |
imgIds = coco_test.getImgIds(catIds=catIds); | |
img = coco_test.loadImgs(imgIds[np.random.randint(0,len(imgIds))])[0] | |
im = cv2.imread("/mnt/d/RarePlanes/datasets/synthetic/test/images/" + img['file_name']) | |
plt.axis('off') |
This file contains hidden or 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
""" | |
Full Lab: Spacecraft Motion and Attitude Visualization in Multiple Frames | |
with Exportable Interactive 3D Visualizations for both Final Attitude and ECI Orbit | |
This lab simulates a spacecraft orbiting Earth with an attitude control system. | |
It produces: | |
- Static plots (attitude error, control torque, rate error, orientation projection) | |
- An animation showing the spacecraft moving in the ECI frame along its orbit, | |
with its body frame and Hill (movement) frame axes. | |
- Two interactive Plotly 3D figures exported as HTML files: |
This file contains hidden or 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
""" | |
ntut-lab1.py | |
Sets initial conditions for a spacecraft in Basilisk 2.4.0. | |
""" | |
from Basilisk.simulation import spacecraft | |
from Basilisk.utilities import SimulationBaseClass, macros | |
import matplotlib.pyplot as plt | |
# Create simulation base |
OlderNewer