Unable to use Detect Defects on Printed Circuit Boards Using YOLOX Network Example

3 views (last 30 days)
Hi All,
I am trying to run the Automated Visual inspection toolbox example:
Detect Defects on Printed Circuit Boards Using YOLOX Network
I am trying to run the example on both the live editor and on my local MatLab application but are getting errors trying to unzip the urls given.
Was wondering if anyone else had any luck successfully running this example?
Here is the error I am getting.
error using matlab.io.interal.archive.checkFilename>downloadArchiveFile
Function UNZIP was unable to read URL ''https://github.com/Ironbrotherstyle/PCB-DATASET/archive/refs/head/master.zip''.
Error in matlab.io.internal.archive.checkFilename (line51)
fullfilename = downloadArchiveFile(protocol, filename, functionName);
Error in parseUnArchiveInputs (line 83)
[archiveFilename, url] = matlab.io.internal.archive.checkFilename(archiveFilename, validExtensions, archiveFcn, argName);
Error in unzip (line 58)
[zipFilename, outputDIr, url, urlFilename] = parseUnArchiveInputs( ...
Error in dowloadPCBDefectData )line 16)
unzip(dataURL, dataDir);
Thank you!

Answers (1)

Aishwarya
Aishwarya on 20 Mar 2024
Edited: Aishwarya on 20 Mar 2024
Hi @Alex,
I recently had the opportunity to run the “Detect Defects on Printed Circuit Boards Using YOLOX Network” example code on MATLAB R2023b successfully.
After reviewing the error message, it seems like the URL is different from what is mentioned in the example code. Consider the following steps to help resolve the issue:
  • The URL in the error message seems to be incorrect as it produces a “404: Not Found” error when trying to manually access it through the browser.
  • After inspecting the “dowloadPCBDefectData.m” file in the example folder, the correct URL should have “heads” instead of “head” in the path. Here is the corrected URL path: https://github.com/Ironbrotherstyle/PCB-DATASET/archive/refs/heads/master.zip
  • Correct the “dowloadPCBDefectData.m” script with the above URL link. The corrected line in the script is shown in the code snippet below:
dataURL = 'https://github.com/Ironbrotherstyle/PCB-DATASET/archive/refs/heads/master.zip';
unzip(dataURL, dataDir);
I hope this helps resolve your query!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!